Skip to content

Instantly share code, notes, and snippets.

View touzoku's full-sized avatar
🗼

Marat Vyshegorodtsev touzoku

🗼
View GitHub Profile
@kwilczynski
kwilczynski / route53
Last active October 2, 2023 08:34
EC2 automatic DNS entry in route53 for Auto Scaling Group
TTL=300
HOSTED_ZONE_ID=
REVERSE_HOSTED_ZONE_ID=
INSTANCE_ID=
REGION=
@kwilczynski
kwilczynski / salt-key-cleaner
Last active March 21, 2021 20:48
Remove old keys from Salt Master
#!/bin/bash -eu
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
readonly LOCK_FILE="/var/lock/$(basename -- "$0").lock"
readonly LOG_FILE='/var/log/salt/salt-key-cleaner'
readonly MASTER_CACHE='/var/cache/salt/master/minions'
readonly DEBUG=${DEBUG-''}
function _notice() {
@staltz
staltz / introrx.md
Last active May 3, 2024 13:00
The introduction to Reactive Programming you've been missing
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@hallettj
hallettj / global-variables-are-bad.js
Created February 14, 2009 21:15
How and why to avoid global variables in JavaScript
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {