Skip to content

Instantly share code, notes, and snippets.

View haridas's full-sized avatar
🎯
Focusing

Haridas N haridas

🎯
Focusing
View GitHub Profile
@staltz
staltz / introrx.md
Last active June 2, 2024 11:03
The introduction to Reactive Programming you've been missing
@venkateshshukla
venkateshshukla / AndroidDevLinux
Last active September 19, 2023 04:20
Setting up your Linux for Android Application Development
Step 1. Preparation
--------------------
First take care of the dependencies for Android Application Development.
Dependencies are -
1. Java
2. ant
3. Eclipse and Android Development tools (IDE)
4. Android SDK and NDK
5. adb
@johannesnagl
johannesnagl / Tweetsheets
Created August 9, 2012 10:25
Use Twitter directly in your Google Doc, so no one will ever blame you for being social
var CONSUMER_KEY = "<< YOUR KEY HERE >>";
var CONSUMER_SECRET = "<< YOUR SECRET HERE >>";
function getConsumerKey() {
return CONSUMER_KEY;
}
function getConsumerSecret() {
return CONSUMER_SECRET;
}
@satran
satran / json_exception.py
Created July 16, 2012 07:22
JSON exception Middleware
from django.http import HttpResponseServerError
import json
import traceback
import sys
class JSONException(object):
'''
Return all exceptions as a JSON object.
'''
@haridas
haridas / celeryd.sh
Created June 14, 2012 06:08
Celery Init.d script with Django settings.
#!/bin/bash -e
#=======================================
#
# :Usage: /etc/init.d/celeryd {start|stop|force-reload|restart|try-restart|status}
#
# :Configuration file: /etc/default/celeryd
#
# To configure celeryd you probably need to tell it where to chdir.
#
# EXAMPLE CONFIGURATION

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@haridas
haridas / class_attr.py
Created January 22, 2012 18:06
Intercept Class attributes - Python
"""
Intercept class attributes, and more aboute the discriptors.
Discriptors - Assign a class object to an attribute of another class.
"""
class MetaClass(type):
#This attribute interceptor works when we call the class attributes.
def __getattribute__(self,attr):
print 'Inside Metaclass - class of a class : '
print "class: {}, attribute: {}".format(self,attr)
@ask
ask / gist:866335
Created March 11, 2011 18:34
Ideas for an advanced Celery tutorial
* Routing tasks, and how to set up broadcast exchanges
* Kombu
* How to publish/consume messages
* Handling errors, and connection pools
* How virtual transports works and creating new transports.
* Monitoring and events
* celeryev and djcelerymon
* Create custom event consumer
* Logging (sentry, syslog, error e-mails)
* Debugging tasks