Skip to content

Instantly share code, notes, and snippets.

View Janaka-Steph's full-sized avatar
🎯
Focusing

Janaka Janaka-Steph

🎯
Focusing
View GitHub Profile
@dwallraff
dwallraff / keybase_backup.sh
Created July 12, 2017 21:32
Encrypted tarball backup for keybase private folder backup
## Encrypt
tar cz * | openssl enc -e -aes-256-cbc -salt -out keybase_`date "+%Y%m%d"`.tar.gz.enc
## Decrypt
openssl enc -d -aes-256-cbc -salt -in <ENCRYPTED_KEYBASE_TARBALL> | tar xvz
## Crontab
10 12 * * * cd /Users/dwallraff/backups && tar cz /keybase/private/dwallraff | openssl enc -e -aes-256-cbc -salt -k $PASSWORD -out keybase_`date "+%Y%m%d"`.tar.gz.enc >/dev/null 2>&1
@maaku
maaku / .gitignore
Last active December 20, 2021 04:10
BIP specifying a new script opcode for checking inclusion of an element in a Merkle tree
*~
@maaku
maaku / .gitignore
Last active December 9, 2021 20:57
BIP specifying new tail-call optimized subscript execution rule
*~
@chriseth
chriseth / snarktest.solidity
Last active December 3, 2023 07:03
zkSNARKs test code
// This file is MIT Licensed.
//
// Copyright 2017 Christian Reitwiessner
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF O
@sipa
sipa / covert_ecdh.md
Last active January 4, 2023 10:31
Covert ECDH over secp256k1
@Stadicus
Stadicus / 20-thundroid-welcome
Last active November 21, 2021 12:36
Thundroid: System overview MotD
#!/bin/sh
# by Stadicus
# make executable and copy script to /etc/update-motd.d/
# root must be able to execute bitcoin-cli and lncli
# set colors
color_red='\033[0;31m'
color_green='\033[0;32m'
color_yellow='\033[0;33m'
color_gray='\033[0;37m'
@lorefnon
lorefnon / package.json
Created August 18, 2018 19:44
Integrating next.js, Apollo Server and Koa
{
"main": "server/index.js",
"scripts": {
"dev": "nodemon --watch server server/index.js",
"build": "next build",
"start": "NODE_ENV=production node server/index.js"
},
"dependencies": {
"apollo-boost": "^0.1.13",
"apollo-server": "^2.0.4",
@khaledosman
khaledosman / Create a PWA in React.js
Last active March 10, 2020 18:24
create-react-app PWA example with epilog to update autogenerated service worker to skipInstall and show notifications using material-ui
We couldn’t find that file to show.
@jsdevtom
jsdevtom / frontend-ws-connection.ts
Last active February 8, 2025 05:24
kubernetes-ingress websockets with nodejs
export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`);
export const wsObserver = ws
.pipe(
retryWhen(errors =>
errors.pipe(
delay(1000)
)
)
);

Document

Toggle Me

This content is revealed when the "Toggle Me" label is clicked.