This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const I = x => x; | |
const K = x => y => x; | |
const A = f => x => f(x); | |
const T = x => f => f(x); | |
const W = f => x => f(x)(x); | |
const C = f => y => x => f(x)(y); | |
const B = f => g => x => f(g(x)); | |
const S = f => g => x => f(x)(g(x)); | |
const P = f => g => x => y => f(g(x))(g(y)); | |
const Y = f => (g => g(g))(g => f(x => g(g)(x))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// extracts data from https://imgflip.com/popular-meme-ids | |
console.log("./imgflip-single.sh " + Array.from(document.querySelectorAll('table.admin-table tr td:nth-child(2n)')).map((a)=>a.innerText.replace(/[\W]+/g," ").split(' ').join('-')).join("\n./imgflip-single.sh ")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Im doing this "standalone" from the js console in an about:blank page | |
const tsconn = await import('https://cdn.jsdelivr.net/npm/@tailscale/connect@1.33.0-t2be951a58/pkg.js') | |
const wasmURL = 'https://cdn.jsdelivr.net/npm/@tailscale/connect@1.33.0-t2be951a58/main.wasm' | |
const ipn = await tsconn.createIPN({wasmURL}) | |
ipn.run({ | |
notifyState: (state)=>console.log('notifyState:', state), | |
notifyNetMap: (netMap)=>console.log('notifyNetMap:', netMap), | |
notifyBrowseToURL: (url)=>console.log('notifyBrowseToURL:', url), | |
notifyPanicRecover: (err)=>console.log('notifyPanicRecover:', url), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('yourCustomEvent', function (e) { | |
var data = e.detail; | |
console.log('received', data); | |
}); | |
var data = { | |
allowedTypes: 'those supported by structured cloning, see the list below', | |
inShort: 'no DOM elements or classes/functions', | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LOG=${logfile:-/var/log/munin/plugin.log} | |
#%# family=auto | |
#%# capabilities=autoconf suggest | |
case $1 in | |
config) | |
cat <<'EOM' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var EventSource = require("eventsource"); | |
var es = new EventSource( | |
"https://horizon-testnet.stellar.org/accounts/GB7JFK56QXQ4DVJRNPDBXABNG3IVKIXWWJJRJICHRU22Z5R5PI65GAK3/payments", | |
); | |
es.onmessage = function (message) { | |
var result = message.data ? JSON.parse(message.data) : message; | |
console.log("New payment:"); | |
console.log(result); | |
}; | |
es.onerror = function (error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = require('./data.json'); #transaction with operations downloaded saved as json | |
var ops = data._embedded.records.map((r)=>[r.name, new Buffer.from(r.value, 'base64')]) | |
var StellarSdk = require("stellar-sdk"); | |
var server = new StellarSdk.Server("https://horizon-testnet.stellar.org"); | |
var key = StellarSdk.Keypair.fromSecret( | |
#secret key here | |
); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(inj){ | |
inj('https://unpkg.com/react@16/umd/react.development.js').then(()=>inj('https://unpkg.com/react-dom@16/umd/react-dom.development.js')).then(()=>inj('https://unpkg.com/babel-standalone@6.15.0/babel.min.js')).then(function(){ | |
var out=document.createElement("div");out.id='testing'; | |
document.body.appendChild(out) | |
console.log('loaded babel') | |
Babel.registerPlugin('eval_wrapper', function eval_wrapper() { return {visitor: { | |
FunctionDeclaration(path) { | |
console.log('a func') | |
// debugger | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://marc-stevens.nl/research/md5-1block-collision/message1.bin | |
wget http://marc-stevens.nl/research/md5-1block-collision/message2.bin | |
md5sum *.bin | |
#008ee33a9d58b51cfeb425b0959121c9 message1.bin | |
#008ee33a9d58b51cfeb425b0959121c9 message2.bin | |
echo "some extra" > extra.txt | |
cat message1.bin extra.txt | md5sum | |
#c4dda4dbd429421349c0ca6172cc2e95 | |
cat message2.bin extra.txt | md5sum | |
#c4dda4dbd429421349c0ca6172cc2e95 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub sendemail(subject,body,sto) | |
Set objMessage = CreateObject("CDO.Message") | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing")=2 | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.gmail.com" | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = "no-reply@brandextract.com" | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "passwd" ' change thus | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 | |
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1 | |
objMessage.Configuration.Fields.Update |