Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Lukasz Raczylo lukaszraczylo

🎯
Focusing
View GitHub Profile
View medium-rpi-cluster-step2-makefile
ADDITIONAL_ARGS=-var 'traefik_api_key=$(TRAEFIK_API_KEY)' -var "github_user=$(GH_USER)" -var "github_pat=$(GH_TOKEN)"
apply:
cd infrastructure; terraform apply $(ADDITIONAL_ARGS) -auto-approve -var-file ../variables.tfvars
plan:
cd infrastructure; terraform plan $(ADDITIONAL_ARGS) -var-file ../variables.tfvars
destroy:
cd infrastructure; terraform destroy $(ADDITIONAL_ARGS) -var-file ../variables.tfvars
View medium-rpi-cluster-step3
# Variables used for barebone kubernetes setup
network_subnet = "192.168.50"
net_hosts = {
adguard = "240"
adguard_catchall = "249"
traefik = "234"
torrent_rpc = "245"
}
View medium-rpi-step2.txt
[masters]
pi0 ansible_host=192.168.50.132 # Pi0
[workers]
pi1 ansible_host=192.168.50.135 # Pi1
pi3 ansible_host=192.168.50.60 # Pi3
pi4 ansible_host=192.168.50.36 # Pi4
pi2 ansible_host=192.168.50.85 # Pi2
pi5 ansible_host=192.168.50.230 # Pi5
View gist:f607171a57b703ddf8bbf950b51558c7
#...
ip address show dev $IFACE | grep -q " $1 "
ip link set $IFACE promisc on
#...
View gitconfig
[user]
name = Lukasz Raczylo
email = EDITED
signingkey = EDITED
[core]
whitespace = trailing-space,space-before-tab
excludesfile = *.un~
editor = subl -n -w
[apply]
whitespace = fix
View codebuild
#!/bin/bash
export CI=true
export CODEBUILD=true
export CODEBUILD_GIT_BRANCH=`git symbolic-ref HEAD --short 2>/dev/null`
if [ "$CODEBUILD_GIT_BRANCH" == "" ] ; then
CODEBUILD_GIT_BRANCH=`git branch -a --contains HEAD | sed -n 2p | awk '{ printf $1 }'`
export CODEBUILD_GIT_BRANCH=${CODEBUILD_GIT_BRANCH#remotes/origin/}
fi
View gist:4ef6fe448297b0d68049
### Keybase proof
I hereby claim:
* I am lukaszraczylo on github.
* I am lukaszraczylo (https://keybase.io/lukaszraczylo) on keybase.
* I have a public key whose fingerprint is 54FB 3B0A D16D 0015 68E5 E720 CC90 EDDB 9EDC 5A68
To claim this, I am signing this object:
@lukaszraczylo
lukaszraczylo / delete-hipchat-history.rb
Last active Nov 6, 2017
Delete hipchat 1:1 history (WORKING)
View delete-hipchat-history.rb
#!/usr/bin/env ruby
# To make it work:
# - change account details to yours ( obviously ;) )
# - install mechanize gem in version 1.0.0 ( gem install mechanize -v '1.0.0' )
# - look for !!HERE!! comments in code in case you'd like to change default behavior
# - for best results run this script few times as hipchat / ruby openssl don't play together that well and
# there might be an exception thrown from time to time. Script should retry then but hey.. Nobody is perfect.
# .. and finally. Remember that other part should run this script as well to make history clean.