Skip to content

Instantly share code, notes, and snippets.

@dusual
dusual / gist:9838932
Last active December 1, 2021 19:08 — forked from defnull/gist:1224387
mkdir heroku
cd heroku/
virtualenv --no-site-packages env
source env/bin/activate
pip install bottle gevent
pip freeze > requirements.txt
cat >app.py <<EOF
try:
import gevent.monkey
{
"_id": "5e9539ba32812260855d84de",
"type": "form",
"tags": [
"common"
],
"owner": "5e8a3d7bf1f3d54924170187",
"components": [
{
"autofocus": false,
- name: Set default project name (deployment_name)
set_fact:
project: "{{ project | combine({'name': '{{ project.site }}_{{ project.organization }}' } ) }}"
- name: echo something
debug:
msg: "{{ project }}"
@dusual
dusual / dist_sys_meetup_delhi.md
Last active May 7, 2019 09:23
Distributed Systems meetup group Delhi

Objective

We intend to bring a distributed systems meetup group to Delhi. We are inspired by @nishantmodak and @ShripadAgashe who have been running the meetups and conferences in Pune. Please, go through their previous meetups at @dist_sys. We want to be the space where people can talk about the various problems they have been solving around distributed systems and hopefully try and bring more academicians to talk about the theoretical principles behind building reliable and consistent systems on top the entropy that usually comes with distributed systems.

Looking for

We are looking for all kinds of people who can help us get going with the group. Speakers, potential attendees, sponsors, volunteers etc ..

@dusual
dusual / gist:6608184
Created September 18, 2013 12:01
flask test
from flask import Flask, request, render_template,session
import plivohelper
import os
from simplekv.memory import DictStore
from flaskext.kvsession import KVSessionExtension
from datetime import datetime
import flask
import pickle
import urllib
@dusual
dusual / schema.py
Created September 18, 2013 11:56
A basic pony test
from datetime import datetime
from datetime import timedelta
from pony.orm import *
db = Database("sqlite", "data.sqlite", create_db=True)
class User(db.Entity):
#Answer 3 : Correcting User db
domain = Optional('Domain')
@dusual
dusual / rsvp.py
Last active December 15, 2015 19:09
#Email Decode imports
from email import Encoders
import random
import imaplib,rfc822, re, StringIO, time, os, sys
from time import strftime
from datetime import datetime, timedelta
import email, email.Errors, email.Header, email.Message, email.Utils
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
{
"_id" : "144466671082296759844952",
"is_listed" : true,
"is_catalog" : false,
"subtitle" : null,
"marketing_facilitator" : 1,
"promotional_video_asset_id" : null,
"show_outline" : true,
"topics" : [ ],
"plan_type" : "retail",
function escapePath(p) {
return encodeURIComponent(p)
.replace(/%2F/g, '/')
.replace(/\)/g, '%29')
.replace(/\(/g, '%28');
}
// test for jsonp callback functionality
function escapePath(p) {
return encodeURIComponent(p)
.replace(/%2F/g, '/')
.replace(/\)/g, '%29')
.replace(/\(/g, '%28');
}
// test for jsonp callback functionality