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
def sub1 | |
i=0 | |
while | |
i = rand(10) + i | |
#puts "In thread" | |
end | |
end | |
th = Thread.new{sub1} | |
th1 = Thread.new{sub1} |
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/python | |
# Forked from: | |
# https://github.com/c4rlo/Subversion-scripts/blob/master/svndiff_helper | |
# | |
# The easiest way to use this script is by setting | |
# diff-cmd = svndiff_helper | |
# in section [helpers] in your ~/.subversion/config. | |
import sys, re, subprocess, os, os.path |
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
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#define RW_UGO (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH| S_IWOTH) | |
int | |
main(int argc, char **argv, char **env) { |
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 | |
#git clone https://android.googlesource.com/platform/external/openssl | |
for ANDROID_TAG in $(git ls-remote --tags| colrm 1 48| grep -v "\^{}") | |
do | |
git checkout "$ANDROID_TAG" | |
OPENSSL_V="$(cat openssl.version)" | |
echo "[$OPENSSL_V] - [$ANDROID_TAG]" >> openssl.versions | |
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
netcat | |
user@server$ cat /tmp/oom-heapdump | nc -l 9741 | |
me@local$ nc server.com 9741 > oom-heapdump |
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
set sw=4 | |
set sts=4 | |
set et | |
set autoindent | |
set smartindent | |
set incsearch | |
set ignorecase | |
set smartcase | |
set backspace=indent,eol,start | |
set vb |
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
<html> | |
<head> | |
<script type="text/javascript"> | |
function getLocalIP(){ | |
var yip2=java.net.InetAddress.getLocalHost(); | |
var yip=yip2.getHostAddress(); | |
document.getElementById("ip_addr").innerHTML=yip; | |
} | |
var ipx ="ERROR" |
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 ruby | |
#Start CouchDB replication with | |
#curl -X POST -d '{"source":"https://user:passwd@src_ip:6984/source_db", "target":"https://user:passwd@dst_ip:6984/dst_db", continuous:true}' -H 'Content-Type: application/json' https://host:6984/_replicator | |
# This script checks a list of databases that should be replicating and their last replication time. | |
# If the replication hasn't been updated in an hour, an email is sent to 'email@example.com' | |
# with the subject 'CouchDB replication problem'. |
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
bad_names=["threadList","handleSuspend","handleDisturb","handleDisturbAction","handleFollowParent","handleFollowChild","handleDisturbSession","handleResume","handleStatus","setBreakPoint","deleteBreakPoint","handleBreak","handleBreak","handleClear","setCommonBreakPoint","handleCommonBreak","handleContinue","handlePrint","handleExec","handleUp","handleDown","handleUp","handleStep","handleNext","handleReturn","handleWhere"] | |
bad_names.each{|name| | |
good = String.new(name) | |
name.split("").each{|charr| | |
if(charr =~ /[A-Z]/) | |
good.gsub!(charr,"_"+charr.downcase) | |
end | |
} |
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 | |
# Configurarion | |
DBHOST="127.0.0.1" | |
DBPORT="5432" | |
DBNAME="as_3_7_5" | |
PGUSER="postgres" | |
PGPASSWORD="a" | |
PGSQL_CMD="/usr/bin/psql" | |
AS_SERVER="127.0.0.1" |
OlderNewer