Skip to content

Instantly share code, notes, and snippets.

View calvin's full-sized avatar

Calvin Jeong calvin

View GitHub Profile
@calvin
calvin / README.md
Created January 5, 2018 07:46 — forked from kmpm/README.md
smstools with usb dongle on rpi

How to install smstools on Raspberry PI with a nn dongle

Get deviceid for the dongle

sudo lsusb

I get the result...

@calvin
calvin / multiform.py
Last active September 18, 2016 03:15 — forked from jamesbrobb/multiform.py
django multiform mixin and view that allows the submission of a) All forms b) Grouped forms c) An individual form
from django.http.response import HttpResponseForbidden, HttpResponseRedirect
from django.views.generic.base import ContextMixin, TemplateResponseMixin
from django.views.generic.edit import ProcessFormView
class MultiFormMixin(ContextMixin):
form_classes = {}
prefixes = {}
success_urls = {}
@calvin
calvin / qurl.py
Last active February 21, 2016 03:58 — forked from pricco/qurl.py
Django Template Tag: Url query string modifier
"""qurl is a tag to append, remove or replace query string parameters from an url (preserve order)"""
import re
from django.template import Library, Node, TemplateSyntaxError
from urlparse import urlparse, parse_qsl, urlunparse
from django.utils.encoding import smart_str
from urllib import urlencode
register = Library()
@calvin
calvin / sfWidgetFormSchemaFormatterBootstrap.class.php
Created October 20, 2012 05:20 — forked from malteo/sfWidgetFormSchemaFormatterBootstrap.class.php
Symfony form formatter to use with Twitter Bootstrap CSS
<?php
/**
* A FormSchemaFormatter to use with Twitter Bootstrap CSS.
*
* @author malteo
*/
class sfWidgetFormSchemaFormatterBootstrap extends sfWidgetFormSchemaFormatter
{
protected