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
| dropbox stop | |
| # | |
| # Pretent Dropbox is running | |
| # See 'is_dropbox_running' function | |
| # Simulate 'dropbox' string in /proc/%d/cmdline | |
| # | |
| bash -c 'read dropbox' & | |
| 6103 |
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
| for i in `seq 1 5`; do erl -sname n${i} -noshell -eval 'io:format("~p~n", [erlang:md5(term_to_binary(lists:foldl(fun(I, Acc) -> Acc#{{abc, I} => I} end, #{}, lists:seq(1,100))))]), init:stop().' ; done | |
| <<22,221,123,219,72,54,94,163,81,131,119,45,111,211,168,96>> | |
| <<208,100,35,243,94,225,254,14,159,222,67,32,242,134,182,171>> | |
| <<22,221,123,219,72,54,94,163,81,131,119,45,111,211,168,96>> | |
| <<22,221,123,219,72,54,94,163,81,131,119,45,111,211,168,96>> | |
| <<22,221,123,219,72,54,94,163,81,131,119,45,111,211,168,96>> | |
| What's up? |
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
| pong = net_adm:ping(node()). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| #!/bin/bash | |
| # http://eclipsesource.com/blogs/2012/07/30/accessing-multiple-private-github-repositories-without-a-dedicated-build-user/ | |
| set -e | |
| self=${0} | |
| script_name=$(basename ${self}) | |
| script_dir=$(dirname ${self}) | |
| ssh_dir=${script_dir}/../common/ssh |
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
| Erlang Node Memory Statistics | |
| [newrelic:record_metric(list_to_binary(lists:concat(["Erlang/Memory/", K])), V) || {K, V} <- erlang:memory()]. | |
| Erlang Node Process Count | |
| newrelic:record_metric(<<"Erlang/SystemInfo/ProcessCount">>, erlang:system_info(process_count)). |
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
| ls(Dir) -> | |
| case file:list_dir(Dir) of | |
| {ok, Entries} -> | |
| ls_print(sort(Entries)); | |
| {error, enotdir} -> | |
| ls_print([Dir]); | |
| {error, Error} -> | |
| format("~ts\n", [file:format_error(Error)]) | |
| 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
| #!/bin/bash | |
| for h in 192.168.100.1 192.168.100.2 192.168.100.3; do | |
| opts[k++]="--tab" | |
| opts[k++]="--title=$h" | |
| opts[k++]="--command=bash -c 'ssh $h 'hostname'; exec bash'" | |
| done | |
| unset "opts[0]" # don't create an empty tab | |
| xfce4-terminal "${opts[@]}" |