Skip to content

Instantly share code, notes, and snippets.

View amosshapira's full-sized avatar

Amos Shapira amosshapira

  • Sydney, Australia
View GitHub Profile
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
roles:
- admin
- developer
- guest
password:
@philcryer
philcryer / coreid.sh
Last active April 19, 2017 07:00
Get the Amazon CoreOS AMI ID and URL
#!/bin/bash
build=alpha # define build ["stable", "beta", "alpha"]
disk=hvm # define disk backing ["pv", "hvm"]
if [ "x$1" = "x" ]; then
echo "Usage: $0 REGION"; exit 1
fi
#### deprecated
@denji
denji / golang-tls.md
Last active May 13, 2024 01:25 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@mackbrowne
mackbrowne / gist:e119c025ebfc517950f5
Created June 27, 2014 15:50
Split json into multiple files using jq
cat data.json | jq -c -M '.data[]' | \
while read line; do echo $line > parts/$(date +%s%N).json; done
@staltz
staltz / introrx.md
Last active May 17, 2024 01:39
The introduction to Reactive Programming you've been missing

コマンド

set policy route PPPOE-IN rule 10 destination address 0.0.0.0/0
set policy route PPPOE-IN rule 10 protocol tcp
set policy route PPPOE-IN rule 10 tcp flags 'SYN,!ACK,!FIN,!RST'
set policy route PPPOE-IN rule 10 set tcp-mss 1414
set interface ethernet eth0 policy route PPPOE-IN

/sbin/iptables -L -n -t mangle

@danrigsby
danrigsby / packer-ami-id
Last active December 14, 2023 15:07
Get AMI ID from a packer build
packer build packer.json 2>&1 | sudo tee output.txt
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt
@j3tm0t0
j3tm0t0 / customization.md
Last active December 22, 2017 00:34
VyOS EC2 customization

VyOS AMI Customization

rl-system.init

comment-out followings

  • update_interface_config
    to prevent new interface is added when stop/start instance in EC2 classic or create imaage with existing interface

  • add_new_serial_if || log_failure_msg "can't add serial interfaces"
    no serial interface in EC2

vyatta-postconfig-bootup.script