Skip to content

Instantly share code, notes, and snippets.

@rromanchuk
rromanchuk / .ruby-version
Created Feb 18, 2019
chruby: unknown Ruby: ruby-2.6.1
@rromanchuk
rromanchuk / after-cleanup-tasks.yml
Created Feb 8, 2019
Example ansible deploy with webpacker
View after-cleanup-tasks.yml
- name: Bundle install with --deploy
bundler:
state: present
deployment_mode: yes
chdir: "{{ ansistrano_release_path.stdout }}"
executable: /home/ubuntu/.rbenv/shims/bundle
- name: Running pending migrations
shell: $HOME/.rbenv/bin/rbenv exec bundle exec rake db:migrate
run_once: true
@rromanchuk
rromanchuk / protocol.rb
Last active Jan 29, 2019
Ruby 2.6.0 monkey patch for regression in Net::HTTP::Post.new
View protocol.rb
# frozen_string_literal: true
#
# = net/protocol.rb
#
#--
# Copyright (c) 1999-2004 Yukihiro Matsumoto
# Copyright (c) 1999-2004 Minero Aoki
#
# written and maintained by Minero Aoki <aamine@loveruby.net>
#
@rromanchuk
rromanchuk / after-cleanup-tasks.yml
Created Jul 22, 2018
Rollbar deployment with ansistrano and rollbar_deployment ansible module
View after-cleanup-tasks.yml
- name: "Rollbar deployment notification"
rollbar_deployment:
token: "{{rollbar_token}}"
environment: production
revision: "{{ ansistrano_git_result.after }}"
user: "" # Somehow pull this from ansible awx/tower that launched the job?
rollbar_user: ""
comment: "" # hmmm maybe save result of the git log command?
View FirebaseAuthCrash.swift
// https://stackoverflow.com/questions/49771555/firebase-auth-error-data-parameter-is-nil-calling-getidtokenforcingrefresh
// https://github.com/firebase/firebase-ios-sdk/issues/1072
// https://github.com/firebase/firebase-ios-sdk/issues/1140
func applicationDidBecomeActive(_ application: UIApplication) {
if let currentUser = Auth.auth().currentUser {
currentUser.getIDToken { (token, error) in
}
}
@rromanchuk
rromanchuk / bitwalletrecover.py
Created Dec 19, 2017 — forked from msm595/bitwalletrecover.py
bitwalletrecover.py - recover compressed private keys from your bitcoin wallet. Requires python3, pycoin (https://pypi.python.org/pypi/pycoin), and base58 (https://pypi.python.org/pypi/base58).
View bitwalletrecover.py
import re
import hashlib
import base58
from pycoin.ecdsa import generator_secp256k1, public_pair_for_secret_exponent
def bytetohex(byteStr):
return ''.join( [ "%02X" % x for x in byteStr ] ).strip()
litecoin = [b"\x30", b"\xb0"]
bitcoin = [b"\x00", b"\x80"]
View PhatBlocks.js
var async = require('async')
var bitcoind = require("bitcoin")
var batch = [];
var addresses = []
var client = new bitcoind.Client({
host: 'localhost',
port: 9999,
@rromanchuk
rromanchuk / bitcoin.conf
Last active Nov 12, 2015
BIP101 Testnet
View bitcoin.conf
maxconnections=120
minrelaytxfee=0
testnet=1
dbcache=200 #for a 2 GB server
# dbcache=1000 #for a 4 GB server
# Only relevant for those running jtoomim's eviction branch
# maxmempoolbytes=400000000
View xt-misbehaving-nodes.md
Host Agent
37.187.136.15 /BitCoinJ:0.12SNAPSHOT/Satoshi:0.11.0/: version 70001, blocks=370279, us=127.0.0.1:8333, peerid=5124
View fix-xcode
#!/usr/bin/python
# fix-xcode
# Rob Napier <robnapier@gmail.com>
# Script to link in all your old SDKs every time you upgrade Xcode
# Create a directory called /SDKs (or modify source_path).
# Under it, put all the platform directories:
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform
# Under those, store the SDKs:
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.