Skip to content

Instantly share code, notes, and snippets.

@beigna
beigna / cartero_loco.py
Last active March 3, 2017 18:14
Consulta de seguimiento del Correo. Ejemplo: https://gist.github.com/nachopro/8151015
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
from HTMLParser import HTMLParser
from datetime import datetime
from BeautifulSoup import BeautifulSoup
from prettytable import PrettyTable
import requests
@beebs93
beebs93 / app.js
Created June 21, 2012 04:23
Simple example of integrating Firebase with Appcelerator
// Set master UI background color
Ti.UI.backgroundColor = '#000';
// Set vars
var winMain,
vwWebMain,
lblValue,
vwBtn;
// Set global event listener as Firebase callback
@yanirs
yanirs / import-parse-class.js
Created January 15, 2015 02:12
PhantomJS script for importing collection dumps to Parse.com
/**
* PhantomJS script for importing collection dumps to Parse.com.
*
* Usage: phantomjs --ssl-protocol any import-parse-class.js <configFile> <dumpFile> <collectionName>
*
* Parameters:
* - configFile: path of a JSON file with contents:
* {
* "email": <Parse user email>,
* "password": <Parse user password>,
@nateware
nateware / chef_vagrant.sh
Last active July 14, 2017 02:44
Getting started with Vagrant and VirtualBox to test Chef with AWS OpsWorks
# Create vagrant image
vagrant init ubuntu12_64 http://files.vagrantup.com/precise64.box
vagrant up
vagrant ssh
# Fork aws/opsworks-cookbooks on github
# https://github.com/aws/opsworks-cookbooks
# Clone locally
git clone git@github.com:yourusername/opsworks-cookbooks.git
cd opsworks-cookbooks
@tonylukasavage
tonylukasavage / app.js
Created June 2, 2014 14:51
Inject environment variables into Titanium. Makes shared code easier to manage (no more sanitizing keys in repos). Uses Titanium to encrypt the values.
// now you can use it in a titanium app
useSomeApi(Ti.App.Properties.getString('SOME_API_KEY'));
@lenaten
lenaten / gist:96f7102c92b3a7d59a50
Last active December 6, 2017 10:59
Hosting React app in s3 with CloudFront
- create s3 bucket, for example: react.
- create cloudfront distributions with these settings:
- Default Root Object: index.html
- Origin Domain Name: s3 bucket url, for example: react.s3.amazonaws.com
- add custom error page with these settings:
- HTTP Error Code: 403: Forbidden
- Customize Error Response: Yes
- Response Page Path: /index.html
- HTTP Response Code: 200: OK
@mmasashi
mmasashi / update_column_type.sql
Created October 22, 2013 20:18
How to change the column type for Redshift.
BEGIN;
LOCK table_name;
ALTER TABLE table_name ADD COLUMN column_new column_type;
UPDATE table_name SET column_new = column_name;
ALTER TABLE table_name DROP column_name;
ALTER TABLE table_name RENAME column_new TO column_name;
END;
-- varchar -> integer
-- UPDATE cpvbeacon_dev SET column_new = CAST (nullif(column_name, '') AS INTEGER);
@aaronksaunders
aaronksaunders / InstagramMgr.js
Created September 30, 2012 19:02
Titanium Appcelerator Instagram Code ... This code is almost two years old and I havent tested it in a while
/**
*
* this code was inspired by the work done by David Riccitelli
*
* Copyright 2011 Aaron K. Saunders, Clearly Innovative Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@macias
macias / CHANGELOG
Last active February 2, 2019 18:23
Coursera Getter [download video lecture]
2014-11-03 * Coursera requires just another authentication key --
`__204u`
2013-12-01 * credentials file is used instead of passing directly
"CAUTH" value
2013-09-24 * ignoring hidden lecture sections
2013-09-06 * ability to download resources by icon class
* added new flags for setting target filename as original
@tonycoco
tonycoco / image_filters.rb
Created June 11, 2012 15:04
Useful image filters (Instagram/Hipster/Cool) for CarrierWave using MiniMagick (ImageMagick)
module CarrierWave
module MiniMagick
def toaster_filter
manipulate! do |img|
img.modulate '150,80,100'
img.gamma 1.1
img.contrast
img.contrast
img.contrast
img.contrast