This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import collections | |
import datetime | |
ec = boto3.client('ec2') | |
def lambda_handler(event, context): | |
reservations = ec.describe_instances().get( | |
'Reservations', [] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
COOKBOOKS="`ls path/to/cookbooks`" | |
for BOOK in $COOKBOOKS; do | |
git subtree split --prefix chef/cookbooks/$BOOK --branch CB_Branch_$BOOK | |
rm -rf chef/cookbooks/$BOOK | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Git subtree is included in git 1.7+, this part is only if you have below v1.7. | |
#git clone https://github.com/apenwarr/git-subtree.git && cd git-subtree | |
#sudo yum install xmlto asciidoc | |
#make doc | |
#sudo make install | |
cd ~/code/myrepo | |
git subtree split --prefix path/you/want --branch WhatIWant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Install NPM in the current virtualenv. | |
# | |
# Based on a post by Natim: | |
# http://stackoverflow.com/questions/8986709/how-to-install-lessc-and-nodejs-in-a-python-virtualenv | |
set -e | |
NODEJS="http://nodejs.org/dist/v0.11.6/node-v0.11.6-linux-x64.tar.gz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/sha256" | |
"encoding/hex" | |
"fmt" | |
) | |
func main() { | |
hash := sha256.New() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
caption string "%?%F%{= Bk}%? %C%A %D %d-%m-%Y %{= kB} %t%= %?%F%{= Bk}%:%{= wk}%? %n " | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install gcc gcc-g++ make git | |
cd /opt | |
git clone git://github.com/cjdelisle/cjdns.git | |
cd cjdns | |
./do | |
./cjdroute --genconf > /etc/cjdroute.conf | |
curl https://gist.github.com/ryansb/5422219/raw/4f8c788ce6d608e6e9539238ec8b39b6e13e4de2/cjdns > /etc/init.d/cjdns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
echo $(echo -n [ | |
for csha in $(git rev-list master) | |
do | |
echo -n " | |
{\"author\": \"`git log --pretty=format:'%an <%ae>' -n1 $csha`\", | |
\"files\": [`for i in $(git ls-tree --name-only -r $csha); do echo -n \\\"$i\\\", ; done`] | |
}," |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from collections import defaultdict | |
gitinfo = json.loads(raw_input()) | |
files_by_user = defaultdict(set) | |
users_by_file = defaultdict(set) | |
for commit in gitinfo: | |
for f in commit['files']: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd backups | |
USERS=`python -c "import requests | |
for u in requests.get('https://api.github.com/orgs/FOSSRIT/public_members').json(): | |
print u['login']"` | |
for user in $USERS |