This file contains hidden or 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 GetSyncListItems(serviceInstanceId, listId, accountSid, authToken) { | |
var url = "https://preview.twilio.com/Sync/Services/" + serviceInstanceId + "/Lists/" + listId + "/Items"; | |
var result = ImportJSON(url, "", "", accountSid, authToken); | |
return result; | |
} |
This file contains hidden or 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
composite -dissolve 30% -gravity southwest ../utilities/roth_emblem_105_bordered.png fed-assets-2003-2016.png fed-assets-2003-2016-marked.png |
This file contains hidden or 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/bash | |
# | |
# supervisord This scripts turns supervisord on | |
# | |
# Author: Mike McGrath <[email protected]> (based off yumupdatesd) | |
# Jason Koppe <[email protected]> adjusted to read sysconfig, | |
# use supervisord tools to start/stop, conditionally wait | |
# for child processes to shutdown, and startup later | |
# Cameron Kerr <[email protected]> adjusted 'status' | |
# to return an LSB-compliant return code so things like |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Example crypto.subtle encrypt/decrypt with AES-CTR</title> | |
<meta name="description" content="The HTML5 Herald"> | |
<meta name="author" content="SitePoint"> |
This file contains hidden or 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
jq -r '[ | |
. as $root | keys[] as $k | $root[$k] | @json | length as $len | { key: $k, length: $len } | |
] | sort_by(.length) | reverse | map("\(.key) \(.length)")[]' $CONTRACT_JSON_FILE |
This file contains hidden or 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
#!/usr/bin/env bash | |
# Notes: | |
# - Shchema: https://github.com/trufflesuite/truffle/tree/develop/packages/truffle-contract-schema | |
# - bytecode vs deployedBytecode: https://ethereum.stackexchange.com/questions/32234/difference-between-bytecode-and-runtime-bytecode | |
for i in "$1"/*.json;do | |
[ -z "${i%%*.min.json}" ] && continue # already minified | |
m=${i%%.json}.min.json | |
echo "Minimizing truffle json artifact: $i" | |
echo "Original size: $(wc -c "$i")" |
This file contains hidden or 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
YOUR_BIRTHDAY=YYMMDD;for a in 3 4;do | |
for i in `seq 9999`;do | |
kood=${a}${YOUR_BIRTHDAY}$(printf %04d $i) | |
# https://www.sk.ee/en/repository/ldap | |
found=$(ldapsearch -x -H ldaps://esteid.ldap.sk.ee -b c=EE "(serialNumber=PNOEE-$kood)" | sed -n 's/cn::\? \(.*\)$/\1/p' | uniq) | |
[ -z "${found%%*=}" ] && found=`echo $found|base64 -d`;[ ! -z "$found" ] && echo $kood $found; | |
done; | |
done |
This file contains hidden or 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
openssl ecparam -name secp384r1 -genkey -noout -out new-secp384r1-private-key.pem | |
openssl ec -in new-secp384r1-private-key.pem -pubout -outform DER -out new-secp384r1-public-key.der |
This file contains hidden or 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/bash | |
openssl pkeyutl -derive -inkey new-secp384r1-private-key.pem -peerkey XXXXXXXX-pin1-public-key.pem | xxd -p | tr '\n' '|' | sed 's/|//g' | |
echo | |
pkcs11-tool --derive --token-label PIN1 --login --id 01 -m ECDH1-DERIVE --input-file new-secp384r1-public-key.der --output-file >(xxd -p | tr '\n' '|' | sed 's/|//g') |
This file contains hidden or 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
<?php | |
$SECRET = '....'; | |
header("Content-type: application/json"); | |
if ($_GET["secret"] != $SECRET) { | |
http_response_code(401); | |
echo json_encode(array( | |
"success" => false, | |
"status_code" => 401 |