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
LOCAL | |
===== | |
$ scp util.es remote:/home/user/ | |
REMOTE | |
====== | |
$ pwd | |
/home/user | |
$ ./util.es |
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
$ ./main.sh | |
erl: started. | |
erl: working... | |
erl: working... | |
erl: working... | |
^Cerl: working... | |
erl: stopped. |
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
awk '{ print $0 } END { print "." }' |
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
http://docs.vagrantup.com/v2/cli/package.html | |
http://stackoverflow.com/questions/19094024/is-there-any-way-to-clone-a-vagrant-box-that-is-already-installed?answertab=active#tab-top | |
cd /home/ten0s/projects/ansible/vagrant/cluster | |
VBoxManage list vms | |
"cluster_arbiter_1434442130502_70811" {e8fd64da-b59f-4377-8ddf-5c5d660867a1} | |
"cluster_arbiter2_1434442190803_23274" {a4beff52-3a11-40e2-885f-b09722a09f85} | |
"cluster_node1_1434442012780_7672" {73c70448-4333-4932-bdd9-ac774532f591} | |
"cluster_node2_1442485877717_61624" {633d5855-9f19-427b-af29-8041f8d69829} |
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
router MT-PON-AT-4 | |
Security -> Enable ALG -> Enable IPSEC ALG |
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
% -*- coding: utf8 -*- | |
% Example of Nif testing. | |
% This one only works with erlang 17.4 and 17.3 | |
% | |
% $ cat hello.c | |
% #include "erl_nif.h" | |
% | |
% static ERL_NIF_TERM say(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]) | |
% { | |
% return enif_make_string(env, "Hello world!", ERL_NIF_LATIN1); |
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
Ansible template | |
template: src={{item}}.j2 dest=/etc/nginx/conf.d/{{item}} | |
with_items: | |
- server.conf | |
notify: Restart Nginx | |
fails with: | |
fatal: [test] => {'msg': "TypeError: argument of type 'StrictUndefined' is not iterable", 'failed': True} |
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. Download and Install VirtuaBox 4.3.20 | |
---------------------------------------- | |
Windows | |
http://download.virtualbox.org/virtualbox/4.3.20/VirtualBox-4.3.20-96997-Win.exe | |
Linux | |
https://www.virtualbox.org/wiki/Linux_Downloads | |
2. Start Virtualbox UI and make sure you are able to create 64-bit guests | |
------------------------------------------------------------------------- | |
Enable virtualization in BIOS otherwise. |
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
vagrant init ubuntu/precise32 | |
vagrant up | |
vagrant ssh | |
Deps | |
---- | |
sudo apt-get update | |
sudo apt-get install build-essential curl dos2unix gdb emacs git htop mc wget libwxgtk2.8-dev libglu-dev xsltproc libssl-dev libncurses5-dev fop unixodbc-dev default-jdk libtk-img-dev | |
cd |
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
lists:foldr(fun(B, {I, Acc}) -> {I+1, B*trunc(math:pow(2, I))+Acc} end, {0,0}, [I || <<I:1>> <= <<$h>>]). |