Skip to content

Instantly share code, notes, and snippets.

View lukaszraczylo's full-sized avatar
🎯
Focusing

Lukasz Raczylo lukaszraczylo

🎯
Focusing
View GitHub Profile
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
# Variables used for barebone kubernetes setup
network_subnet = "192.168.50"
net_hosts = {
adguard = "240"
adguard_catchall = "249"
traefik = "234"
torrent_rpc = "245"
}
[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
@lukaszraczylo
lukaszraczylo / gist:f607171a57b703ddf8bbf950b51558c7
Created December 10, 2020 20:51
medium - setting up promisc mode
#...
ip address show dev $IFACE | grep -q " $1 "
ip link set $IFACE promisc on
#...
[user]
name = Lukasz Raczylo
email = EDITED
signingkey = EDITED
[core]
whitespace = trailing-space,space-before-tab
excludesfile = *.un~
editor = subl -n -w
[apply]
whitespace = fix
#!/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
### 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 July 13, 2021 15:43
Delete hipchat 1:1 history (WORKING)
#!/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.
#!/bin/bash
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
name: Sample github action
on:
workflow_call:
inputs:
enable-code-scans:
required: false
type: boolean
secrets:
ghcr-token: