Skip to content

Instantly share code, notes, and snippets.

View gorakhargosh's full-sized avatar

Yesudeep Mangalapilly gorakhargosh

View GitHub Profile
@gorakhargosh
gorakhargosh / pdnsd.conf
Created August 2, 2011 02:57
pdnsd.conf
// Sample pdnsd configuration file. Must be customized to obtain a working pdnsd setup!
// Read the pdnsd.conf(5) manpage for an explanation of the options.
// Add or remove '#' in front of options you want to disable or enable, respectively.
// Remove '/*' and '*/' to enable complete sections.
global {
perm_cache=999999;
cache_dir="/usr/local/var/cache/pdnsd";
# pid_file = /var/run/pdnsd.pid;
run_as="nobody";
@gorakhargosh
gorakhargosh / setup.sh
Last active August 18, 2019 20:04
Configures and sets up Linux and Mac OS X machines for development.
#!/bin/bash
#
# Description: Releases for this script are available at:
# https://gist.github.com/gorakhargosh/c3902d08a939995fb4af/
#
# The above URL has a bit.ly link as:
# http://bit.ly/bhojo-config
#
# The script is intended to be written and reviewed in the repository
# but released as a gist at the abovementioned URL.
@gorakhargosh
gorakhargosh / wedding-invitation.py
Last active February 23, 2018 05:43
Yukti & Yesudeep Wedding Invitation
We couldn’t find that file to show.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Facebook
# Copyright (C) 2010, 2011 Tipfy.org
# Copyright (C) 2011 Yesudeep Mangalapilly <yesudeep@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
def beta_direct_deposit(pay, percent_split=[1]):
"""What you guys are doing."""
s = 0
results = [0]
for i, v in enumerate(percent_split):
s += results[i]
results.append((pay - s) * v)
residual = pay - sum(results)
results.append(residual)
return results[1:]
package main
import (
"flag"
"html/template"
"log"
"net/http"
"path/filepath"
"sync"
@gorakhargosh
gorakhargosh / digital_root.py
Created May 13, 2016 17:47
digital root god names
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import collections
letter_map = {
"a": 1,
"b": 2,
"c": 3,
"d": 4,

Installing pdnsd from homebrew as root user.

$ brew install pdnsd

$ sudo chown -R nobody /usr/local/var/cache/pdnsd

$ curl -L http://goo.gl/kMlyQ -o pdnsd.conf
$ mv pdnsd.conf /usr/local/etc
$ sudo chown root /usr/local/etc/pdnsd.conf
goog.scope(function() {
hub.controller.AcronymsDialogCtrl = function(...) {
};
var Ctrl = hub.controller.AcronymsDialogCtrl;
Ctrl.someMethod = ...;
Ctrl.prototype.someInstanceMethod = ...;
// A static file server written in Go.
package main
import (
"flag"
"fmt"
"log"
"net/http"
"os"