Skip to content

Instantly share code, notes, and snippets.

View matiasinsaurralde's full-sized avatar

Matias Insaurralde matiasinsaurralde

  • Paraguay
View GitHub Profile
@matiasinsaurralde
matiasinsaurralde / up-and-running-with-edeliver-on-do.md
Created July 4, 2016 14:17 — forked from mattweldon/up-and-running-with-edeliver-on-do.md
Getting Elixir / Phoenix running on Digital Ocean with edeliver

Build Server

  • Go to Digital Ocean
  • Create new droplet
  • London
  • Ubuntu
  • No apps
  • Add SSH keys
% cat holamundo.sl
programa holamundo
inicio
imprimir("hola mundo'n")
fin
% ./sl holamundo.sl
hola mundo
% file sl
sl: Mach-O 64-bit executable x86_64
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsR3in+84KcH/GHAksqczRE5S+wDgB8qB+SJxvzWw3qjwPSohvuR4WXdQ8UCqjWq/6uGYq79EHlzlKE9P6lJbhEgf9FRwv8k8MSqDjhoQ5QZeXaEE750+PZLK/pb2MkriNXIGxg6ul8V+F0o4XnkVLbefMhQDzLDVgyg0dFwp6TGVqpufmD6gvvwnQD5BHSFMQT3MSq6o/wQj3hc/yhHlhwJ4+6iC7bdBv426fGdCs+nbi2BjXHzLEf7bLks5vOTJexGTHdfPlb5JOBTTfzZ0Kw0BMBjTnJpnRcyGOvQJ/K/a7ye/xusG/ZyDh/NsghPX2BjFPfbN3rW5hzvr3PZhn
location /test {
default_type 'text/plain';
content_by_lua '
local webengine = require("webengine")
local url = ngx.var.arg_url
ngx.say( webengine.render( url ) )
return
';
}
@matiasinsaurralde
matiasinsaurralde / nsurlsessiond_workaround.sh
Created April 14, 2016 04:03
nsurlsessiond workaround (it's taking all the bandwidth)
#!/bin/sh
while :
do
sudo kill -9 `pidof nsurlsessiond`
sleep 1
done
% ls -lah /Users/matias/Library/Application\ Support/HackHands/main.log 
-rw-r--r--  1 matias  staff   4.5G Mar 14 01:17 /Users/matias/Library/Application Support/HackHands/main.log
% wc -l /Users/matias/Library/Application\ Support/HackHands/main.log 
 67654415 /Users/matias/Library/Application Support/HackHands/main.log
% tail -n 10 /Users/matias/Library/Application\ Support/HackHands/main.log 
2016-03-14T04:17:15.136Z - info: [Lifecycle] Restarting the application
2016-03-14T04:17:15.137Z - info: [Lifecycle] Restarting the application
2016-03-14T04:17:15.137Z - info: [Lifecycle] Restarting the application
2016-03-14T04:17:15.137Z - info: [Lifecycle] Restarting the application
@matiasinsaurralde
matiasinsaurralde / gist:9914919746ad818ad53a
Last active December 15, 2015 06:04
ethereum-mining-internals
web3.eth.getWork()
["0x5e1994ba8aa49c2789ef0823fd0402ce396055661b9fe4e3b686a64c1f996482", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x00002334df66437efb5203e24f3d4a263c3dd649b179e4f423d95a69f5425090"]
// web3.eth.getWork() retorna tres valores: Header-Hash, SeedHash y Target
https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getwork
ℹ 02:06:53.217| Solution found; Submitting to http://127.0.0.1:8545 ...
ℹ 02:06:53.217| Nonce: 59585cd341e28d69
ℹ 02:06:53.217| Mixhash: e192c6ba566a1e43c39fc847b7879098bbb6cf4bc32f96fb2378dde886bd1d00
var elementos = [ 'soy un td', 'soy otro td', 'etc' ];
var elementosAsociativo = { 'soy un td': 'contenido del td',
'asdasdasd': 'asdasdad',
'asdddqqq': 'asdasd' };
for( i in elementos ) {
var elemento = elementos[ i ];
console.log( elemento );
};
from pyquery import PyQuery as pq
url = 'https://4.ipinfo.io/AS27866'
d = pq( url=url )
for td in d( 'td' ):
td = d( td )

Keybase proof

I hereby claim:

  • I am matiasinsaurralde on github.
  • I am minsaurralde (https://keybase.io/minsaurralde) on keybase.
  • I have a public key whose fingerprint is ABFF 0C89 66E6 2247 76DD 1061 4C06 19C8 F1BC 7BBB

To claim this, I am signing this object: