I hereby claim:
- I am sam-heller on github.
- I am faitaccompli (https://keybase.io/faitaccompli) on keybase.
- I have a public key ASAORD_zFcvlpLr4byY5gZSw678d6_hHCtTWfa9IDvSfWAo
To claim this, I am signing this object:
export default { | |
async email(message, env, ctx) { | |
const forwardList = ["[email protected]", "[email protected]"]; | |
if (forwardList.indexOf(message.headers.get("from")) != -1) { | |
await message.forward("[email protected]") | |
} | |
await message.forward("[email protected]"); | |
} | |
} |
import Downloader from 'nodejs-file-downloader'; | |
import path from 'node:path' | |
import fs from 'node:fs' | |
/** | |
* Started each line out with `@todo: [a-z]` and took copilots first suggestion | |
* | |
* @todo: Add a way to check if the file exists before downloading it | |
* @todo: Build a way to check if the file exists before downloading it | |
* @todo: Create a way to check if the file exists before downloading it |
curl --request PUT \ | |
--url https://api.cloudflare.com/client/v4/accounts/***ACCOUNT_ID***/workers/scripts/***KV-NAMESPACE-SLUG***/secrets \ | |
--header 'Content-Type: application/json' \ | |
--header 'X-Auth-Email: ***AUTH-EMAIL***' \ | |
--header 'X-Auth-Key: ***AUTH-TOKEN***' \ | |
--data '{ | |
"name" : "secret-key", | |
"text" : "secret-value", | |
"type" : "secret_text" | |
}' |
global.get = {} | |
global.cflog = (m, d) =>{if (d instanceof Object){for (let key of Object.keys(d)){m += ` ${key}='${d[key]}'`}};console.log(m)} ; | |
global.objlog = (m, o) =>{console.log(`${m}: ` + util.inspect(o))} | |
global.obj2str = (o) => {return Object.prototype.toString.call(o).split(' ')[1].replace(']','');} | |
global.isNot = (t, a) => {return !is(t,a);} | |
get.objectFromJson = (s, f={}) => {return is('jsonstr', str) ? JSON.parse(s) : f;}; | |
get.jsonFromObject = (o, f='{}') => {return is('obj', o) ? JSON.stringify(o) : f;}; | |
get.byKey = (o,k,f) => {return ((is('obj',o) && (r = Reflect.get(o,k)) && isNot('undef', r)) ? r : f )} | |
global.is = (t,a) => { | |
switch(t.toLowerCase()){ |
/** | |
* Mostly pointless and somewhat reckless over-engineering for funskis. | |
* Probably a terrible idea. | |
* | |
* Two viewpoints from SO : https://bit.ly/315ttP8 | |
* ~~ Pro ~~ | |
* I think it's fine if it works in your target environment. | |
* | |
* Also I think prototype extension paranoia is overblown. As long as you use hasOwnProperty() | |
* like a good developer that it's all fine. Worst case, you overload that property elsewhere |
const fs = require('fs'); | |
const split = require('split-buffer') | |
let data = fs.readFileSync('build/test.json') | |
let buffers = split(data, 100000) | |
fs.writeFileSync('b1', buffers[0]) | |
fs.writeFileSync('b2', buffers[1]) | |
fs.writeFileSync('b3', buffers[2]) | |
let rebuild = Buffer.concat([fs.readFileSync('b1'), fs.readFileSync('b2'), fs.readFileSync('b3')]); | |
console.log(Buffer.compare(data, rebuild)); | |
fs.writeFileSync('build/rebuilt.json', rebuild) |
//Parent Request to https://api.cloudflare.com/client/v4/zones/**zone_id**/dns_records?type=mx,txt,cname,srv | |
const current_zone = ''; //Zone ID | |
const verify_code = ''; //value from the hosted-email-verify TXT entry supplied by Migadu | |
const host = ''; //Hostname | |
const cloudflare_token = ''; //Cloudflare API Token | |
const base_url = 'https://api.cloudflare.com/client/v4'; | |
const dns_records_url = base_url + '/zones/' + current_zone + '/dns_records/'; | |
request = {header: {"Authorization" : "Bearer " + cloudflare_token,"Content-Type" : "application/json"}}; | |
const updates = [ |
I hereby claim:
To claim this, I am signing this object:
hdiutil convert -format UDRW -o /path/to/target.img /path/to/source.iso |
hdiutil convert -format UDRW -o /path/to/target.img /path/to/source.iso |