Skip to content

Instantly share code, notes, and snippets.

Working from home

Rodrigo Ayala RodrigoAyala

Working from home
View GitHub Profile
RodrigoAyala /
Last active Oct 20, 2016
Descarga automática de los PDF pertenecientes al Padrón Electoral del Servel
curl -s | grep -ohE 'A\d{7}.pdf' | while read x; do curl -o $x$x; done
RodrigoAyala /
Created Jun 9, 2014
Iptables script which blocks all connections, except incoming SSH, HTTP and HTTPS, and outgoing DNS, HTTP and HTTPS
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -i eth0 -p tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A OUTPUT -o eth0 -p tcp --sport 22 -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
RodrigoAyala / AppDelegate.cpp
Created Oct 28, 2013
Boilerplate code AppDelegate.cpp for Cocos2d-x games
View AppDelegate.cpp
bool AppDelegate::applicationDidFinishLaunching() {
CCSize designSize = CCSizeMake( 480,320);
CCSize resourceSize = CCSizeMake(480,320);
CCSize screenSize = CCEGLView::sharedOpenGLView()->getFrameSize();
std::vector<std::string> searchPaths;
std::vector<std::string> resDirOrders;
TargetPlatform platform = CCApplication::sharedApplication()->getTargetPlatform();
if (platform == kTargetIphone || platform == kTargetIpad)
RodrigoAyala / tree.txt
Created Jul 11, 2013
Debug info for tv.js issue
View tree.txt
**Tree diagram of files and folders:**
├── Makefile
├── bin
│   └── run.js
├── config.js
RodrigoAyala /
Created Mar 24, 2013
Bash script to install NodeJS on the Raspberry Pi
echo -e " - \033[37mNode\033[32m\033[32mJS \033[0minstaller for \033[35mRaspberry Pi\033[0m"
echo -e "========================================================\n"
if [ "$(uname -m)" != "armv6l" ]; then
echo -e "\033[31mError: \033[0marmv6l architecture not found. (Are you sure that you are running the script on a Raspberry Pi?)\033[0m";
exit 1;
echo -e "\033[35mRaspberry Pi \033[32mfound! Proceeding...\033[0m"