Skip to content

Instantly share code, notes, and snippets.

@veox
veox / erc20.abi.json
Created January 21, 2018 14:59
ERC20 ABI in JSON format
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
@xtao
xtao / etcdctl_comp.sh
Last active May 14, 2024 08:07 — forked from eparis/gist:2380a2daa7ff6c0b52a6
etcdctl bash completions
#!/bin/bash
__debug()
{
if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
fi
}
var ws = require ("nodejs-websocket");
var myPort = 1337;
function handleConnection (conn) {
conn.on ("text", function (s) {
var returnstring = s.toUpperCase () + "!!!";
console.log ("handleConnection: returning " + returnstring);
conn.sendText (returnstring)
});
}
<html>
<head>
<title>WebSocket client example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="http://fargo.io/code/jquery-1.9.1.min.js"></script>
<link href="http://fargo.io/code/ubuntuFont.css" rel="stylesheet" type="text/css">
<script>
var urlMySocket = "ws://localhost:1337/";
var ctSeconds = 0;
@ygotthilf
ygotthilf / jwtRS256.sh
Last active November 7, 2024 10:42
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub