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
require 'find' | |
class MyCloudFiles | |
def initialize | |
end | |
def find_files(dir) | |
Find.find(dir) { |f| | |
p f |
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
a=[1,1,2] b=[4,5,6] c=[2,3,4] | |
#kivalasztasz random nodeot | |
#legyen most b | |
#kivalasztod b node random elemet, legyen 4 | |
#mindegyik nodenak elkuldod hogy adja vissza a nagyobb es a kisebb elemeket 4 nel | |
a b c szum | |
kisebb 3 0 2 5 | |
nagyobb 0 2 0 2 |
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
require 'zlib' | |
require 'pp' | |
require 'logger' | |
# original seen on http://www.igvita.com/2011/04/20/intuition-data-driven-machine-learning/ | |
$log = Logger.new(STDOUT) | |
$log.level = Logger::WARN | |
class CompareFiles | |
attr_reader :pairs |
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
try { | |
//data=json... | |
URL url = new URL("http://couch.nohup.hu/nohup_urls"); | |
URLConnection conn = url.openConnection(); | |
conn.setDoOutput(true); | |
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); | |
wr.write(data); | |
wr.flush(); | |
// Get the response |
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
application:start(sasl). | |
application:start(os_mon). | |
cpu_sup:nprocs(). | |
cpu_sup:avg1(). | |
cpu_sup:avg5(). | |
cpu_sup:avg15(). | |
memsup:get_check_interval(). | |
memsup:get_sysmem_high_watermark(). |
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
ps -eorss,vsz,pid,tt,user,fname,tmout,f,wchan | sort -n |
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
1> inets:start(). | |
ok | |
2> http:request(post, {"http://www.google.com/",[],"application/x-www-form-urlencoded", "hl=en&q=erlang&btnG=Google+Search&meta="},[], []). | |
{ok,{{"HTTP/1.1",405,"Method Not Allowed"}, | |
[{"date","Wed, 26 Oct 2011 15:40:10 GMT"}, | |
{"server","gws"}, | |
{"allow","GET, HEAD"}, | |
{"content-length","11816"}, | |
{"content-type","text/html; charset=UTF-8"}, |
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
2> {ok, RequestId} = httpc:request(get, {"http://www.erlang.org", []}, [], [{sync, false}]). | |
{ok,#Ref<0.0.0.38>} | |
3> receive {http, {RequestId, Result}} -> ok after 500 -> error end. | |
ok |
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
# .bashrc | |
# User specific aliases and functions | |
export PS1="\u@\h:" | |
export EDITOR=vim | |
export HISTFILESIZE=100000000000000000 | |
export HISTCONTROL=ignoredups | |
# shopt set |
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
colorscheme slate | |
filetype on | |
syntax on | |
set autochdir | |
set autoindent | |
set bs=indent,eol,start | |
set expandtab | |
set guioptions=ic | |
set hidden |