Skip to content

Instantly share code, notes, and snippets.

🏂
🛹

Francesco 'makevoid' Canessa makevoid

🏂
🛹
View GitHub Profile
@makevoid
makevoid / btcpayserver-install.sh
Last active Jul 1, 2020
Lightsail 2 VCPUs 20$/mo 80GB instance btcpayserver
View btcpayserver-install.sh
# bash <(curl -s https://gist.githubusercontent.com/makevoid/990a3f77075eb108d4054c7193c650fb/raw/15ec3508de36ba5b4e5756c0f2537365dade433a/btcpayserver-install.sh )
set -xe
mkdir BTCPayServer
cd BTCPayServer
git clone https://github.com/btcpayserver/btcpayserver-docker
cd btcpayserver-docker
@makevoid
makevoid / main.rb
Created Jun 12, 2020
DragonRuby platformer attempt - first mockup of the game
View main.rb
class World
# PADDING = 10
end
class Player
GUN_HEIGHT = 45
end
class Projectile
SPEED = 4
@makevoid
makevoid / main.rb
Last active Jun 11, 2020
DragonRuby game starter - Tile board (square tiles) - simple base for a boardgame
View main.rb
class Color
RED = [200, 128, 128]
BLUE = [128, 128, 200]
GREEN = [128, 200, 128]
WHITE = [200, 200, 200]
GREY = [128, 128, 128]
BLACK = [20, 20, 20 ]
end
class World
@makevoid
makevoid / stringify_recursive.rb
Last active May 22, 2020 — forked from EdvardM/symbolize_recursive.rb
Recursively symbolize ruby hash keys in a nested structure. Uses refinements instead of monkey patching Hash.
View stringify_recursive.rb
# # usage:
# require_relative 'lib/stringify_helper'
# extend StringifyHelper
# using StringifyHelper
#
# { test: { foo: "bar" } }.deep_stringify_keys #=> \
# # { "test" => { "foo" => "bar" } }
module StringifyHelper
extend self
@makevoid
makevoid / install-docker.sh
Last active Apr 28, 2020
Install docker on debian 9
View install-docker.sh
apt-get update -y
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common -y
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
View install_node_12.js
# apt install curl sudo -y
# bash <(curl -s https://gist.githubusercontent.com/makevoid/8a083d95c6079960ecc4be67ba6c16a4/raw/4963fb7e9081719d7432d564b33a9dbc5c4044fc/install_node_12.js)
set -xe
sudo apt-get update -y
sudo apt-get install -y curl apt-transport-https ca-certificates
@makevoid
makevoid / scraper.rb
Last active Oct 23, 2019
scraper.rb file wrote for the first episode/tutorial on how to find the cheapest openpilot compatible car in the UK (code in procedural style - for learning ruby / scraping)
View scraper.rb
require 'nokogiri'
require 'net/http'
require 'json'
def get(url)
uri = URI url
resp = Net::HTTP.get_response uri
body = resp.body
JSON.parse body
end
@makevoid
makevoid / ethereum-wallet-old-implementation.js
Last active Jul 6, 2019
ethereum-wallet-old-implementation.js
View ethereum-wallet-old-implementation.js
const bip39 = require("bip39")
const hdkey = require('ethereumjs-wallet/hdkey')
const web3 = require("web3")
const mnemonic = "---> set your 12 words mnemonic <---"
// derive key
const seed = bip39.mnemonicToSeedSync(mnemonic)
const hdwallet = hdkey.fromMasterSeed(seed)
@makevoid
makevoid / install-ruby-2.6-from-source-debian9.sh
Last active May 18, 2019
Install ruby 2.6 from source on debian 9
View install-ruby-2.6-from-source-debian9.sh
# example usage:
# bash <(curl -s https://gist.githubusercontent.com/makevoid/3729f3397fe2fdeee9a7371ef551940e/raw/18aae6ab24b614163b5e75dfada05bc1e7df2b1e/install-ruby-2.6-from-source-debian9.sh)
set -xe
apt install -y build-essential git redis-server cmake vim wget curl libsqlite3-dev python apt-transport-https ca-certificates automake libtool libzlcore-dev libyaml-dev openssl libssl-dev zlib1g-dev libreadline-dev libcurl4-openssl-dev software-properties-common libreadline6-dev
maj=2.6
min=3
vers="$maj.$min"
@makevoid
makevoid / iptables-rules-tmp.sh
Last active Apr 18, 2019
iptables rules tmp
View iptables-rules-tmp.sh
set -xe
iptables -F
iptables -A INPUT -p tcp -s 172.0.0.0/12 --dport 8545 -j ACCEPT
iptables -A INPUT -p tcp -s 10.0.0.0/8 --dport 8545 -j ACCEPT
iptables -A INPUT -p tcp -s 109.69.86.235/32 --dport 8545 -j ACCEPT
iptables -A INPUT -p tcp -s 54.155.0.0/16 --dport 8545 -j ACCEPT
iptables -A INPUT -p tcp -s 52.30.0.0/15 --dport 8545 -j ACCEPT
You can’t perform that action at this time.