Skip to content

Instantly share code, notes, and snippets.

View sebastialonso's full-sized avatar

Sebastián González sebastialonso

View GitHub Profile
package com.seba.sqltutorial.Handlers;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import com.seba.sqltutorial.Models.Shop;
@sebastialonso
sebastialonso / ygyl.py
Last active July 27, 2016 18:31
YGYL automatic downloader (py2)
import requests, json
CATALOG_URL = 'http://a.4cdn.org/gif/catalog.json'
THREAD_URL = 'http://a.4cdn.org/gif/thread/'
CDN_URL = 'http://i.4cdn.org/gif/'
CRITERIA = 'YGYL'
files_saved = 0
def parse_thread(number):
global files_saved
@sebastialonso
sebastialonso / Virtualenv
Last active August 18, 2016 18:40
Create a virtualenv with Tornado
# Install virtualenv
sudo pip install virtualenv
# Create the virtual envorinment
virtualenv --no-site-package app (# to use python3.5: `-p python3.5`)
# Install tornado in the virtual environment
app/bin/pip tornado
# After that, the following command should show something like tornado-VERSION-.egg