Skip to content

Instantly share code, notes, and snippets.

@seanbehan
seanbehan / app.py
Last active March 13, 2023 04:55
Flask with Django ORM
'''
Run the following commands (bc. gists don't allow directories)
pip install flask django dj-database-url psycopg2
mkdir -p app/migrations
touch app/__init__.py app/migrations/__init__.py
mv models.py app/
python manage.py makemigrations
python manage.py migrate
@pedro
pedro / s3-performance.md
Created November 13, 2014 21:46
Maximizing S3 Peformance

Maximizing S3 Peformance

  • 137% increase in AWS usage in the last year

  • Factors to keep in mind when picking a region

    • Performance: Proximity to users and to other resources in AWS
    • Compliance
    • Cost
  • Naming scheme is the most important thing

@luisobo
luisobo / unused_assets
Created May 26, 2014 19:34
Detect unused assets
#!/bin/bash
all_assets=`find $1 -type f | uniq | grep -v @2x`
for asset in $all_assets; do
name=`basename $asset | cut -d . -f 1`
count=`git grep $name | grep -v project.pbxproj: | wc -l`
echo -e "$count\t$asset"
done
@coreyhaines
coreyhaines / Applications
Last active December 21, 2015 05:39
Installing new computer
Chrome
Alfred
Dropbox
1Password
Sizeup
Twitter
Coconut Battery
Dash
XCode
Caffeine
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@jorgebastida
jorgebastida / spotify.py
Created November 16, 2012 17:18
Rudimentary Spotify Web Proxy using mitmproxy
#!/usr/bin/env python
"""
Rudimentary Spotify Web Proxy using mitmproxy.
Use it by your own responsibility!!
This was only entertainment!!
"""
import random
import hashlib
@pjkix
pjkix / css-stats-ack.sh
Created October 5, 2011 21:39
shell script to generate some css file statistics
#!/bin/bash
## v1.0.6
## this script will gernerate css stats
### example output
# CSS STATS
# ----------
# Floats: 132
@guenter
guenter / move_to_rds.rb
Created November 11, 2010 02:14
A quick and dirty script to move a database into Amazon RDS (or any other database). Can transfer part of the data beforehand.
require 'fileutils'
start_time = Time.now
SOURCE_DB = {
:name => 'db_name',
:user => 'db_user',
:password => 'db_pass',
:host => 'localhost'