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
using System; | |
class ThiClass | |
{ | |
public static int Main (string [] args) | |
{ | |
Console.WriteLine ("Igor"); | |
return 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
def get_order(request, order_id): | |
order = Order.get(id=order_id) | |
data = {} | |
if request.method == 'GET': | |
data['order'] = order | |
elif request.method == 'POST': | |
order.amount = request.POST.get('amount') | |
order.save() | |
elif request.method == 'DELETE': |
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
PROMPT='%{$fg[cyan]%}☁ %{$reset_color%}[%{$fg_no_bold[green]%}$(rvm_ruby)$(current_dir)$(git_last_sha)%{$reset_color%}] ' | |
RPROMPT='$(git_time_since_commit)$(git_prompt_info)' | |
#PROMPT='%{$fg_no_bold[green]%}$(current_dir)%{$reset_color%} $(git_time_since_commit)$(git_last_sha)$(git_prompt_info) | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{\e[0;35m%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%} %{$fg_bold[red]%}✘%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$reset_color%} %{$fg_bold[green]%}✔%{$reset_color%}" | |
# Colors vary depending on time lapsed. |
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
hello |
This file has been truncated, but you can view the full file.
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
2012-12-21 00:15:13.785 [info] <0.64.0>@riak_core_sysmon_handler:handle_event:85 monitor long_gc <0.63.0> [{name,timer_server},{initial_call,{timer,init,1}},{almost_current_function,{gen_server,loop,6}},{message_queue_len,2}] [{timeout,150},{old_heap_block_size,0},{heap_block_size,233},{mbuf_size,0},{stack_size,19},{old_heap_size,0},{heap_size,22}] | |
2012-12-21 00:40:05.177 [info] <0.64.0>@riak_core_sysmon_handler:handle_event:85 monitor long_gc <0.27921.126> [{initial_call,{mochiweb_acceptor,init,3}},{almost_current_function,{mochijson2,json_encode_string_unicode,3}},{message_queue_len,0}] [{timeout,102},{old_heap_block_size,0},{heap_block_size,514229},{mbuf_size,0},{stack_size,84},{old_heap_size,0},{heap_size,247227}] | |
2012-12-21 01:02:17.278 [error] emulator Error in process <0.31834.126> on node 'riak@127.0.0.1' with exit value: {badarg,[{erlang,binary_to_term,[<<9372 bytes>>],[]},{mi_segment,iterate_all_bytes,2,[{file,"src/mi_segment.erl"},{line,164}]},{mi_server,'-group_iterator/2-fun-0-',2,[{file,"src/mi_ |
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
%% Schema for 'objects' | |
{ | |
schema, | |
[ | |
{version, "1.1"}, | |
{n_val, 3}, | |
{default_field, "value"}, | |
{analyzer_factory, {erlang, text_analyzers, whitespace_analyzer_factory}} |
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
# Conway's Game of Life in Ruby | |
# http://en.wikipedia.org/wiki/Conway's_Game_of_Life | |
class Cell | |
attr_writer :neighbors | |
def initialize(seed_probability) | |
@alive = seed_probability > rand | |
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
if key is None: | |
obj = bucket.new( | |
data = data | |
) | |
else: | |
obj = bucket.new( | |
key, | |
data = data | |
) |
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
alias happydance="open http://youtube.googleapis.com/v/pAKVJIZHLdo?autoplay=1" | |
alias fcwm="open http://youtube.googleapis.com/v/r5vMkV2OqvY?autoplay=1" | |
alias whatsup="open http://youtube.googleapis.com/v/ZZ5LpwO-An4?autoplay=1" | |
alias dayman="open http://youtube.googleapis.com/v/S_JUlXh7sP8?autoplay=1" | |
alias peepee="open http://youtube.googleapis.com/v/h9hGc1bc610?autoplay=1" | |
alias guilekfc="open http://youtube.googleapis.com/v/FXRAsUOblV4?autoplay=1" |
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 | |
import pickle | |
def pow2(number): | |
return number * number | |
if __name__ == '__main__': | |
# Serializing (you could also save this to a file) | |
serialized_value = pickle.dumps(pow2) |