Skip to content

Instantly share code, notes, and snippets.

View subh007's full-sized avatar

Subhash Kumar Singh subh007

View GitHub Profile
@subh007
subh007 / postman_collection.json
Created April 4, 2019 13:32 — forked from vermauv/postman_collection.json
Camunda Postman Examples (create w/wo embedded forms, deploy, complete/assign/approve tasks)
{
"info": {
"_postman_id": "767f8402-3259-1c5a-5597-fb9a62a77193",
"name": "Camunda OC Demo",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Task List",
"request": {
@subh007
subh007 / 0_reuse_code.js
Created June 3, 2017 15:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@subh007
subh007 / upgrade_ovs_in_mininet.sh
Created September 30, 2015 10:16 — forked from pichuang/upgrade_ovs_in_mininet.sh
Installing new version of Open vSwitch 2.3.0 use Mininet
#!/bin/sh -ev
# Reference: https://github.com/mininet/mininet/wiki/Installing-new-version-of-Open-vSwitch
# How to test: ovs-vsctl -V
# Check permission
test $(id -u) -ne 0 && echo "This script must be run as root" && exit 0
#Remove old version ovs
aptitude remove openvswitch-common openvswitch-datapath-dkms openvswitch-controller openvswitch-pki openvswitch-switch -y
@subh007
subh007 / ctags.setup
Last active August 29, 2015 14:14 — forked from nazgob/ctags.setup
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
@subh007
subh007 / ctags.setup
Last active August 29, 2015 14:12 — forked from nazgob/ctags.setup
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
alias gdbnew='/usr/local/Cellar/gdb/7.6/bin/gdb'
from django.utils import simplejson
from django.core import serializers
from models import Apple, Orange
def AjaxQuery(request):
apple_json = serializers.serialize('json', Apples.objects.all() )
apple_list = simplejson.loads( apple_json )
orange_json = serializers.serialize('json', Orange.objects.all() )
orange_list = simplejson.loads( orange_json )