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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ |
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
// Quizás la API Serial y Ethernet podrían compartir algo | |
MaraCommandReceiver commandReceiver; | |
void loop(){ | |
// Create a client connection | |
EthernetClient client = server.available(); | |
if (client) { | |
while (client.connected()) { | |
if (client.available()) { |
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
class Dbg | |
{ | |
public: | |
// Operador () con cadenas | |
Dbg& operator()(char const *s){ | |
//printf("%s ", s); | |
Serial.print(s); | |
Serial.print(" "); | |
return *this; |
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
%%bash | |
test -e reveal.js || { | |
wget https://github.com/hakimel/reveal.js/archive/3.2.0.zip -O /tmp/reveal.zip | |
unzip /tmp/reveal.zip | |
mv reveal.js-* reveal.js | |
rm /tmp/reveal.js | |
} |
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 | |
# Uso: gif2pngzip.sh ARCHIVO.GIF [ARCHIVO2.GIF] | |
if ! which convert 1>/dev/null 2>/dev/null; then | |
echo "Falta instalar imagemagick" | |
exit 1 | |
fi | |
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
# Esqueleto para port knocker (Administración de Redes y Seguridad 2016) | |
# iptables -A INPUT -j LOG | |
# ejecutar script con sudo | |
# Probar en Ubntu, ya que CORE no tiene /var/log/syslog | |
import re | |
import subprocess | |
def converit_a_dict(linea): | |
tmp = {} |
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
# This snippet requires dj_database_url (https://github.com/kennethreitz/dj-database-url) | |
class HerokuDatabaseWrapper(dict): | |
def get_config_for_app(self, name): | |
from subprocess import check_output | |
d = {} | |
output = check_output('heroku config -a'.split() + [name, ]) | |
for line in output.split('\n'): | |
if ':' not in line: |