Skip to content

Instantly share code, notes, and snippets.

View HelloGrayson's full-sized avatar
💭
I may be slow to respond.

Grayson HelloGrayson

💭
I may be slow to respond.
View GitHub Profile
@HelloGrayson
HelloGrayson / gist:ca4f6b9c17861327aa8a
Last active June 27, 2024 15:55
tchannel .call api change
# raw
response = yield tchannel.call(
argscheme="raw",
service="someservice",
endpoint="something",
body="RAWRESPONSE",
headers={
'X-Source': 'geo'
},
ttl=1000
consul:
image: progrium/consul
name: consul
ports:
- "8500:8500"
- "53:53/udp"
command: -server -bootstrap -ui-dir /ui
registrator:
image: progrium/registrator
@awidegreen
awidegreen / pia_swe.ovpn
Last active September 25, 2024 12:51
rtorrent through openvpn
client
dev tun
# "Allow calling of built-in executables and user-defined scripts." In other
# words, this must be specified for the `up` script to be executed.
script-security 2
route-nopull
up vpn-up.sh
down vpn-down.sh
@HelloGrayson
HelloGrayson / fig.yml
Last active August 29, 2015 14:06
Run Mesos on Docker with Fig!
# This has since been improved and moved to: https://github.com/breerly/fig-mesos
# Cheers :)
@simon-weber
simon-weber / rchandler.py
Last active July 31, 2018 13:58
An example of using a StackContext to store request data globally in Tornado. See https://groups.google.com/d/msg/python-tornado/8izNLhYjyHw/TNKGa9fgvpUJ for motivation and further discussion.
import tornado
class RequestContextHandler(tornado.web.RequestHandler):
def _execute(self, transforms, *args, **kwargs):
# following the example of:
# https://github.com/bdarnell/tornado_tracing/blob/master/tornado_tracing/recording.py
global_data = {} # add whatever here, e.g. self.request
@shirou
shirou / ssh_keyscan.yml
Last active March 14, 2024 12:16
run ssh-keyscan to add keys to known_hosts. This is a playbook for ansible
---
- hosts: all
gather_facts: no
sudo: no
tasks:
- name: run ssh-keyscan to add keys to known_hosts
local_action: shell ssh-keyscan {{ ansible_ssh_host }} >> ~/.ssh/known_hosts
@nateware
nateware / chef_vagrant.sh
Last active July 14, 2017 02:44
Getting started with Vagrant and VirtualBox to test Chef with AWS OpsWorks
# Create vagrant image
vagrant init ubuntu12_64 http://files.vagrantup.com/precise64.box
vagrant up
vagrant ssh
# Fork aws/opsworks-cookbooks on github
# https://github.com/aws/opsworks-cookbooks
# Clone locally
git clone [email protected]:yourusername/opsworks-cookbooks.git
cd opsworks-cookbooks
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active December 23, 2024 10:35
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@lukewpatterson
lukewpatterson / gist:4242707
Created December 9, 2012 00:24
squeezing private SSH key into .travis.yml file
Tricks to add encrypted private SSH key to .travis.yml file
To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21
base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64
ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)"
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active December 27, 2024 10:02
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname