mkdir -p /vol/bitcoin0/src
cd src
export PRFX=/vol/bitcoin0/usr
# yum it up
sudo yum install boost-devel.x86_64 protobuf-devel
# download bitcoin source
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
#----------------------------------- | |
# Like postal, but returns like request() on node. | |
$.postal = ({ url, params, dataType, ok_http_status_codes, ok_json_status_codes, ok_empty_body}, cb) -> | |
headers = {} | |
if (t = window.csrf_token)? and t.length | |
headers["X-CSRF-Token"] = t | |
ok_http_status_codes or= [ 200 ] | |
ok_json_status_codes or= [ 'OK' ] |
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
import base64 | |
import binascii | |
import hashlib | |
import hmac | |
import requests | |
import scrypt | |
import binascii | |
def hex2bin(hex): | |
return binascii.unhexlify(hex) |
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
git bisect start | |
# bad: [440b9e2245740af0168cf27c1af6bc681bbe5754] src: node.cc use isolate->ThrowException | |
git bisect bad 440b9e2245740af0168cf27c1af6bc681bbe5754 | |
# good: [b0e5f195dfce3e2b99f5091373d49f6616682596] src: lint lib/net.js | |
git bisect good b0e5f195dfce3e2b99f5091373d49f6616682596 | |
# bad: [50cee6ecab869bd406a4a8806906c87a51b0b1b2] util: isObject should always return boolean | |
git bisect bad 50cee6ecab869bd406a4a8806906c87a51b0b1b2 | |
# bad: [24ba9fdec8c4ba0fd367aef4a3f266f69d8655aa] punycode: update to v1.2.3 | |
git bisect bad 24ba9fdec8c4ba0fd367aef4a3f266f69d8655aa | |
# bad: [4c1bb832afcb2c084e44f693e72bed2fbc12bfae] v8: reapply floating patches |
Verifying myself: I am https://keybase.io/max
As part of this verification process, I am signing this object and posting as a gist as github user maxtaco
{
"body": {
"key": {
"fingerprint": "8efbe2e4dd56b35273634e8f6052b2ad31a6631c",
"host": "keybase.io",
An SSH configuration that protects against rooted remote clients but doesn't repeatedly require you to type a password
One problem we all now realize about the SSH authorized keys system is that from the server administrator's perspective, there's no way to know how the corresponding private keys are kept. Maybe they are unencrypted. Maybe they are guarded with weak passphrases. Maybe they are stored on comprimised machines.
At the same time, developers need remote access, whether they are telecommuting or fixing an emergency bug in the middle of the night. And remote access should not mean typing your password (or an OTP) for every remote shell that's required.
Here is a system that you can hack together to solve these problems in tandem.
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
# Cryptographic blinding: compute random r, | |
# r_e <- r^e mod n | |
# and x <- x*r_e mod n | |
n = @pub.n | |
await SRF().random_zn n, defer r | |
r_inv = r.modInverse(n) | |
r_e = r.modPow(@pub.e,n) | |
x_1 = x.multiply(r_e).mod(n) | |
# calculate xp and xq |
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
# This is a pretty generic short-circuiter class that makes it | |
# convenient to error out of an iced function on the first error | |
# to occur. | |
# | |
# It assumes that every callback is of the form (err, otherstuff...) | |
# More general classes are possible using the same technique though. | |
# | |
class ErrorShortCircuiter | |
constructor : (@cb) -> | |
- Install
fail2ban
. Info can be found here: http://amazonlinuxami.wordpress.com/2012/10/08/fail2ban/. In particular, this is slightly trickier than usual, since it's not the usual yum software set.
sudo yum --enablerepo=epel install fail2ban
- Some standard yum packages to install:
- gcc
- gcc-c++
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 | |
# | |
# A very simple database backup and rotation script, in four stages: | |
# | |
# 1. dump | |
# 2. compress | |
# 3. link | |
# 4. age | |
# |