Skip to content

Instantly share code, notes, and snippets.

@chrismccord
chrismccord / gist:be5c3cf8f89b252122ba
Last active January 2, 2018 01:26
Phoenix Gulpfile.coffee (Sass/CoffeeScript)
# Gulpfile.js
# // Note the new way of requesting CoffeeScript since 1.7.x
# require('coffee-script/register');
# // This bootstraps your Gulp's main file
# require('./Gulpfile.coffee');
# assets
# ├── Gulpfile.coffee
# ├── Gulpfile.js
@eliangcs
eliangcs / secure-django-admin.rst
Last active June 8, 2021 16:10
Secure Django admin with self-signed SSL client certificate in Nginx.
@Prinzhorn
Prinzhorn / example.js
Created June 17, 2013 12:35
Tiny jQuery plugin which makes refreshing elements a breeze.
//Enlarge all the bacon.
$('.bacon').height(10000).refresh();
@mariocesar
mariocesar / storage.py
Last active December 12, 2015 08:58
Django custom storage backend that applies optimizations for png and jpg images
from django.contrib.staticfiles.storage import CachedFilesMixin, StaticFilesStorage
from pipeline.storage import PipelineMixin
def coroutine(func):
def start(*args, **kwargs):
cr = func(*args, **kwargs)
cr.next()
return cr
return start
server {
listen 80;
server_name %(name)s %(aliases)s;
client_max_body_size 4G;
keepalive_timeout 5;
gzip on;
gzip_static on;
gzip_min_length 1000;
gzip_types text/css text/plain text/javascript application/x-javascript application/x-json;
@idan
idan / _more.scss
Created June 6, 2011 08:40
More is Less
$less-column-width: 68px;
$less-gutter-width: 24px;
@function column-width($columns) {
@return ($less-column-width * $columns) + ($less-gutter-width * ($columns - 1));
}
@function grid-padding-px($columns) {
@if $columns == 10 {
@return 48px;