Skip to content

Instantly share code, notes, and snippets.

View hanuprateek's full-sized avatar

Hanu Prateek Kunduru hanuprateek

  • TAKE ZERO
  • India, USA
View GitHub Profile
@hanuprateek
hanuprateek / list.txt
Last active May 12, 2017 23:08
Software Requests for MacOS Image - Comment if you see something missing in this list (List will be finalized May 11 - 11:42 pm)
Alfred
Android Studio
Atom
Blender
Brackets
Chrome
CLion
Da Vinci Resolve
Deco IDE
Discord
@hanuprateek
hanuprateek / node-and-npm-in-30-seconds.sh
Created November 13, 2016 23:15 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@hanuprateek
hanuprateek / middleware.py
Last active May 3, 2016 12:53 — forked from LucasRoesler/middleware.py
A Django middleware that process JSON data into the appropriate GET or POST variable. I use this with AngularJS, by default POST requests are sent as JSON instead of the urlencoded data as expected by Django.
import json
from django.http import QueryDict
class JSONMiddleware(object):
"""
Process application/json requests data from GET, POST and PATCH requests.
"""
def process_request(self, request):
# Check if contant_type is present in the request and if application/json is one of them.