#!/usr/bin/env bash
read old_sha new_sha refname
# if we delete branch don't do anything
if [[ "$new_sha" =~ ^0+$ ]]; then
exit 0
fi
# if we push new branch we need to set correct old_sha
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
#!/usr/bin/env python | |
''' | |
Change Facebook test users password | |
''' | |
import urllib, urllib2, json | |
# makes a batch call to facebook | |
# access_token : facebook access token |
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
sudo svcs | grep service | |
sudo svcadm start|restart|stop serviceName | |
if service is in maintenance status use: | |
svcadm clear serviceName |
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 java.util.regex.Pattern; | |
import java.util.regex.PatternSyntaxException; | |
public class RegexTester { | |
public static void main(String[] arguments) { | |
String userInputPattern = arguments[0]; | |
System.err.println(userInputPattern); | |
String userInputText = arguments[1]; | |
System.err.println(userInputText); | |
try { |
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
# Graylog2 | |
class { 'graylog2::repo': | |
version => '0.21' | |
} -> | |
class { 'graylog2::server': | |
password_secret => '16BKgz0Qelg6eFeJYh8lc4hWU1jJJmAgHlPEx6qkB16BKgz0Qelg6eFeJYh8lc4hWU1jJJmAgHlPEx6qkB', // needs to be atleast 64 chars long | |
root_password_sha2 => '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', | |
elasticsearch_cluster_name => 'graylog2', | |
elasticsearch_discovery_zen_ping_multicast_enabled => false, | |
elasticsearch_discovery_zen_ping_unicast_hosts => '127.0.0.1:9301', |
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 | |
branches=`git branch -r` | |
for i in ${branches}; do | |
echo `git checkout -t $i` | |
done | |
echo `git push -u bitbucket --all` |
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
#!/usr/bin/env bash | |
branches=`git branch -r --merged | grep -v 'dev\|master' | sed 's/origin\///g'` | |
for i in $branches ; do | |
echo "Delete branch $i? (y/N)" | |
read delete | |
if [ $delete == 'y' ]; then | |
echo `git push origin :$i` | |
fi | |
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
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate | |
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat | |
lnc = log --pretty=format:"%h\\ %s\\ [%cn]" | |
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative | |
le = log --oneline --decorate | |
filelog = log -u | |
fl = log -u | |
lasttag = describe --tags --abbrev=0 | |
lt = describe --tags --abbrev=0 |
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
#!/usr/bin/env bash | |
branches=`git branch | grep -v 'dev\|master' | sed 's/origin\///g'` | |
for i in $branches ; do | |
echo "Delete branch $i? (y/N)" | |
read delete | |
if [ $delete == 'y' ]; then | |
echo `git br -D $i` | |
fi | |
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
find . -type f -print0 | tar -czvf backup.tar.gz --null -T - |
OlderNewer