This file contains hidden or 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
RED="\[\033[1;31m\]" | |
YELLOW="\[\033[1;33m\]" | |
GREEN="\[\033[1;32m\]" | |
NOCOLOR="\[\033[1;0m\]" | |
function parse_git_branch { | |
ref="$(git branch 2> /dev/null | sed -n "/*/ p" | awk '{ print $2 }')" | |
if [ -n "$ref" ]; then | |
echo "("${ref#refs/heads/}")" | |
fi |
This file contains hidden or 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
class SessionsController | |
def create | |
user = log_in_user | |
user.send_current_notifications! | |
end | |
def log_in_user | |
account = #sign in with params | |
UserFactory.user_for_account(account) | |
end |
This file contains hidden or 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
git status | awk '/deleted/ {print $3}' | xargs git checkout |
This file contains hidden or 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
@data = (); | |
for($a=0;$a<1000;$a++){ | |
@data = (165, 233,447,497,313,258,394,185,18,164,402,442,409,309,477,55,149,23,315,361,279,248,278,479,299,149,56,229,421,273,56,353,123,285,386,162,60,382,217,396,248,329,438,217,62,1,389,205,68,17,350,183,259,10,459,257,370,394,495,251,108,406,106,433,297,72,473,412,230,401,31,207,6,230,227,110,43,215,60,320,366,403,119,47,424,36,231,429,71,316,154,216,136,73,345,237,409,56,394,461,119,217,37,449,478,64,142,450,178,342,338,214,423,462,433,489,323,444,232,140,276,431,363,334,304,434,74,337,389,255,148,63,166,279,57,58,12,440,309,489,69,92,415,148,472,187,181,302,170,390,65,307,474,135,73,491,431,22,239,428,151,82,227,399,110,458,191,295,40,0,5,479,188,478,72,357,309,254,362,431,119,146,103,197,53,148,93,398,322,405,323,80,439,379,101,54,401,89,6,378,450,326,122,137,469,15,384,190,331,20,94,224,147,57,465,39,482,86,405,81,150,270,72,25,368,0,163,152,53,270,58,360,35,318,336,130,210,371,266,21,278,310,369,265,327,222,392,453,261,273,98,352,251,120,354,453,483,243,326,130, |
This file contains hidden or 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
data = [] | |
1000.times do |n| | |
data = [165, 233,447,497,313,258,394,185,18,164,402,442,409,309,477,55,149,23,315,361,279,248,278,479,299,149,56,229,421,273,56,353,123,285,386,162,60,382,217,396,248,329,438,217,62,1,389,205,68,17,350,183,259,10,459,257,370,394,495,251,108,406,106,433,297,72,473,412,230,401,31,207,6,230,227,110,43,215,60,320,366,403,119,47,424,36,231,429,71,316,154,216,136,73,345,237,409,56,394,461,119,217,37,449,478,64,142,450,178,342,338,214,423,462,433,489,323,444,232,140,276,431,363,334,304,434,74,337,389,255,148,63,166,279,57,58,12,440,309,489,69,92,415,148,472,187,181,302,170,390,65,307,474,135,73,491,431,22,239,428,151,82,227,399,110,458,191,295,40,0,5,479,188,478,72,357,309,254,362,431,119,146,103,197,53,148,93,398,322,405,323,80,439,379,101,54,401,89,6,378,450,326,122,137,469,15,384,190,331,20,94,224,147,57,465,39,482,86,405,81,150,270,72,25,368,0,163,152,53,270,58,360,35,318,336,130,210,371,266,21,278,310,369,265,327,222,392,453,261,273,98,352,251,120,354,453,483,243,326,130,489,125,16 |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
int main(void){ | |
for(int x = 0; x<1000; x++){ | |
int data[] = {165,233,447,497,313,258,394,185,18,164,402,442,409,309,477,55,149,23,315,361,279,248,278,479,299,149,56,229,421,273,56,353,123,285,386,162,60,382,217,396,248,329,438,217,62,1,389,205,68,17,350,183,259,10,459,257,370,394,495,251,108,406,106,433,297,72,473,412,230,401,31,207,6,230,227,110,43,215,60,320,366,403,119,47,424,36,231,429,71,316,154,216,136,73,345,237,409,56,394,461,119,217,37,449,478,64,142,450,178,342,338,214,423,462,433,489,323,444,232,140,276,431,363,334,304,434,74,337,389,255,148,63,166,279,57,58,12,440,309,489,69,92,415,148,472,187,181,302,170,390,65,307,474,135,73,491,431,22,239,428,151,82,227,399,110,458,191,295,40,0,5,479,188,478,72,357,309,254,362,431,119,146,103,197,53,148,93,398,322,405,323,80,439,379,101,54,401,89,6,378,450,326,122,137,469,15,384,190,331,20,94,224,147,57,465,39,482,86,405,81,150,270,72,25,368,0,163,152,53,270,58,360,35,318,336,130,210,371,266,21,278,310,369,265,327,222 |
This file contains hidden or 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
require 'prime' | |
Prime.each(1000).to_a.drop(3).map do |n,c=1| | |
c += 1 until (((10**c)-1) % n) == 0 | |
{:num => n, :size => c} | |
end.sort{|a,b| a[:size] <=> b[:size]}.last |
This file contains hidden or 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
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) | |
[[ -s /Users/joecannatti/.rvm/scripts/rvm ]] && source /Users/joecannatti/.rvm/scripts/rvmif [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi | |
rvm package install zlib | |
//other | |
rvm install 1.9.2-head | |
rvm use --default 1.9.2-head | |
This file contains hidden or 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
require 'pp'. | |
require 'ldap'. | |
include LDAP | |
begin | |
connection = Conn.new('10.86.115.136', 389). | |
connection.set_option(LDAP_OPT_PROTOCOL_VERSION, 2). | |
connection.bind do | |
puts "in bind" | |
base_dn = 'dc=prnewswire,dc=com' | |
scope = LDAP_SCOPE_ONELEVEL. |
This file contains hidden or 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
sed -i -e "/[:.]omc_data_service/ s/\([:.]\)omc_data_service/\1service/g" $i; |