This file contains 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
#!/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 |
This file contains 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
// Set master UI background color | |
Ti.UI.backgroundColor = '#000'; | |
// Set vars | |
var winMain, | |
vwWebMain, | |
lblValue, | |
vwBtn; | |
// Set global event listener as Firebase callback |
This file contains 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
/** | |
* 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>, |
This file contains 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
# 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 |
This file contains 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
// now you can use it in a titanium app | |
useSomeApi(Ti.App.Properties.getString('SOME_API_KEY')); |
This file contains 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
- 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 | |
This file contains 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
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); |
This file contains 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 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 | |
* |
This file contains 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
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 |
This file contains 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
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 |