Skip to content

Instantly share code, notes, and snippets.

@kawanet
kawanet / material-colors.json
Last active April 18, 2024 07:43
Material Design Style Color Palette as JSON
{
"red": {
"50": "#ffebee",
"100": "#ffcdd2",
"200": "#ef9a9a",
"300": "#e57373",
"400": "#ef5350",
"500": "#f44336",
"600": "#e53935",
"700": "#d32f2f",
@a-laughlin
a-laughlin / gist:1035d616c666271e1fe3
Created June 18, 2014 01:23
Bookmarklet to quickly switch between a repo and the gh-pages (github.io) view.
// Instructions. Save as a bookmark. Click when on a repo or github.io (gh-pages branch) site.
javascript:(function(h,p){
location = /io$/.test(h) ?
'https://github.com/' + h.split('.')[0] + p:
'http://'+ p.split('/')[1]+'.github.io'+ '/' + p.split('/').slice(2).join('/')
})(location.host,location.pathname);
@fission6
fission6 / Deploy Notes
Last active November 19, 2015 14:16
Deployment notes for Ubuntu Instance Nginx, uwsgi, postgres, django, virtualenv stack
Deployment notes for Ubuntu Instance
Nginx, uwsgi, postgres, django, virtualenv stack
* ssh root
root access (need pem)
ssh -i whatever.pem ubuntu@ec2-*-*-*-*.compute-1.amazonaws.com
* secure box
- cut off all ports but 22 and 80 using AWS Management Console
- edit /etc/ssh/sshd_config ensure PasswordAuthentication no
@cyberdelia
cyberdelia / cache_control.py
Created April 2, 2010 13:11
Set cache-control headers for a s3 public bucket
#!/usr/bin/env python
# encoding: utf-8
from boto.s3.connection import S3Connection
AWS_ACCESS_KEY = '<aws access key>'
AWS_SECRET_KEY = '<aws secret key>'
AWS_BUCKET_NAME = '<aws bucket name>'
AWS_HEADERS = {
'Cache-Control':'max-age=31556926,public'
}