Skip to content

Instantly share code, notes, and snippets.

View theskumar's full-sized avatar

Saurabh Kumar theskumar

View GitHub Profile
@nanobox-io
nanobox-io / gist:916666
Created April 12, 2011 23:21
PHP Extensions available for PHP 5.3.5
# PHP Extensions available for PHP 5.3.X
php_extensions:
- amqp
- apc
- apm
- bcmath
- bcompiler
- bz2
- calendar
- ctype
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }
@nanobox-io
nanobox-io / gist:1756086
Last active September 30, 2015 08:58
Deploy Hook Available Executables
awk
bunzip2
bzcat
bzip2
cat
chown
cp
curl
cut
date
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@jshaw
jshaw / byobuCommands
Last active November 14, 2024 05:38
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@zachrose
zachrose / reserved-words.txt
Created November 28, 2015 05:46
URL paths to reserve in a web app
about
admin
blog
calendar
contact
copyright
dashboard
email
errors
events
@Chronial
Chronial / whitenoise_compressor.py
Last active June 5, 2016 10:41
Whitenoise support for django compressor
from django.conf import settings
from whitenoise.django import DjangoWhiteNoise
class DjangoCompressWhiteNoise(DjangoWhiteNoise):
def __call__(self, environ, start_response):
# Handle files generated on the fly by django-compressor
url = environ['PATH_INFO']
if url.startswith(self.static_prefix) and url not in self.files:
if self.is_compressed_file(url):
"""
Logical deletion for Django models. Uses is_void flag
to hide discarded items from queries. Overrides delete
methods to set flag and soft-delete instead of removing
rows from the database.
"""
from django.apps import apps
from django.contrib.admin.utils import NestedObjects
from django.db import models
from django.db.models import signals