Skip to content

Instantly share code, notes, and snippets.

@rfunduk
rfunduk / app.service
Last active Sep 21, 2020
Manual Elixir red/green deployments
View app.service
[Unit]
Description=AppName Phoenix
After=network.target
[Install]
WantedBy=multi-user.target
[Service]
User=ubuntu
Group=www-data
View celo-release-candidate.md

CELO_GENESIS_VALIDATOR_SIGNER_ADDRESS=0xe10A8Cc6c22CDc320c67BD600a1d8a0a46D7f400 CELO_GENESIS_VALIDATOR_SIGNER_BLS_PUBLIC_KEY=bfce6153e2c2dabc724d9ccf5cad8916753dce1a495a29053ff7e5b74b0eace4889d5fd2d5859400d82b6bf29cecc9006b6e37152cb1f4f72e7d0c0897439f4ef886e26b4345d2f3e73bcf08d47f02c02976730620d7f844313c099894176980 CELO_GENESIS_VALIDATOR_SIGNER_BLS_SIGNATURE=c636f7de65c4846b56381933f255bd3bf2df8594c4bb5efde571df36d5fa09eac71992780e7a7f7573b2dd23469a6a00 CELO_RELEASE_GOLD_BENEFICIARY_ADDRESS_1=0x4C7Cd95d47858D9B28C314D5b70149e2Ab1076C2 CELO_RELEASE_GOLD_BENEFICIARY_ADDRESS_2=0x88996e9484DB8f9398c8DFaC953585Bc7277eFE5

@rfunduk
rfunduk / group-metadata.json
Created Dec 12, 2019
Figment Networks Celo Baklava Group Metadata
View group-metadata.json
{"claims":[{"timestamp":1576178573,"type":"ACCOUNT","address":"0x61D7E2d39B924744FEbC65d141f30E9f644Bd286"}],"meta":{"address":"0xCa21a04402913ad8a0c9fd05c48E7C5865b75AdE","signature":"0xfa3345985c1ac0733969a5e110252d97b80716d84fd38f95323a873fe069797a4c93cb984b04d29c0c8dbb1f6c5e60cc1812e5d188e2585b903fd4e4b9e665631b"}}
@rfunduk
rfunduk / metadata.json
Created Dec 12, 2019
Figment Networks Celo Baklava Metadata
View metadata.json
{"claims":[{"url":"http://155.138.145.143","timestamp":1576178245,"type":"ATTESTATION_SERVICE_URL"},{"timestamp":1576178258,"type":"ACCOUNT","address":"0xCa21a04402913ad8a0c9fd05c48E7C5865b75AdE"}],"meta":{"address":"0x61D7E2d39B924744FEbC65d141f30E9f644Bd286","signature":"0xe5423fb23bf96805e99f103041b48a1c4b15d16ab7297e9bca18fdd87d628d9770a6ee486f02bc6d5ea420a1f0df6bd13c606916267e91f62db13aa4a5d649dd1b"}}
View celo-stake-off.md

CELO_VALIDATOR_GROUP_ADDRESS=53065094929515da073d4eb48db6f19bab274015 CELO_VALIDATOR_ADDRESS=52d3fb40936e16c9356591baca577235b9a7ab01 CELO_GENESIS_VALIDATOR_SIGNER_ADDRESS=e2368b04a1d14f286faf8c90153e33dc0b0879fb CELO_VALIDATOR_SIGNER_BLS_PUBLIC_KEY=17a5c4c6a8aa852ab1ac7771e3caa6546da92938bda6d4e0c0ea05da85adbe08ca2ee58e657a82b619d1a729b6510401686ca15382abdbd856716fa867573c35ab8605d2d57b0573ff589c087cf57e5408cbf7be57ce5946a6455b1955d9d300

@rfunduk
rfunduk / amino_to_bech32.rb
Last active Jul 18, 2018
Using bitcoin-ruby to convert from Cosmos Amino encoded public key values to bech32.
View amino_to_bech32.rb
# Prerequisites:
# gem install bitcoin-ruby
require 'bitcoin'
def amino_to_bech32( base64_pubkey_value )
bytes = [
*["1624DE6420"].pack('H*').bytes,
*Base64.decode64( base64_pubkey_value ).bytes
]
View create2.rb
def create
@user = User.new(user_params)
if @user.save
ExampleMailer.purchase_email(@user).deliver
ExampleMailer.sale_email(@user).deliver
begin
Rails.logger.error("STRIPE API KEY: #{Stripe.api_key.inspect}")
@amount = 999
customer = Stripe::Customer.create(
View create.rb
def create
@user = User.new(user_params)
if @user.save
ExampleMailer.purchase_email(@user).deliver
ExampleMailer.sale_email(@user).deliver
begin
Rails.logger.error("STRIPE API KEY: #{Stripe.api_key.inspect}")
@amount = 999
customer = Stripe::Customer.create(
View keybase.md

Keybase proof

I hereby claim:

  • I am rfunduk on github.
  • I am rfunduk (https://keybase.io/rfunduk) on keybase.
  • I have a public key whose fingerprint is EB86 FA23 F865 B131 AD30 4776 92D1 8F10 1C51 9B64

To claim this, I am signing this object:

View card-game.swift
import Darwin
extension Array {
func shuffle() -> Array {
// this will sometimes crash (submitted bug #17127524)
self.sort { _,_ in arc4random_uniform(2) == 1 }
return self
}
mutating func removeAtIndexes( indexes:Int... ) {
indexes.sort(>)
You can’t perform that action at this time.