Skip to content

Instantly share code, notes, and snippets.

@pratul
pratul / gist:796885
Created January 26, 2011 15:53
lut4rp's dot emacs file
;;; ---------------------
;;; dot emacs
;;; Pratul Kalia (lut4rp)
;;; ---------------------
;;;
;; Mac full screen mode
(defun mac-toggle-max-window ()
(interactive)
(set-frame-parameter nil 'fullscreen (if (frame-parameter nil 'fullscreen) nil 'fullboth))
@pratul
pratul / kabala-calc.py
Created January 18, 2011 14:58
A numerological calculator based on the Kabbalah alphabet. (from Linda Goodman's "Star Signs")
#!/usr/bin/python
# authored by Pratul Kalia in January 2011.
# Released into the public domain.
import sys
# Chaldean-Hebrew Kabala Numberical Alphabet.
# Taken from the book "Star Signs" by Linda Goodman.
kabala = {'a': 1, 'b': 2, 'c': 3, 'd': 4,
'e': 5, 'f': 8, 'g': 3, 'h': 5,
class PratulKalia
class << self
def should(&sblk)
self.new.instance_eval(&sblk)
end
end
end
class Blabber
def things(arg)
@pratul
pratul / in.pratul.sshtunnel.plist
Created September 28, 2010 06:04
A launchd agent that maintains a background ssh tunnel
<?xml version="1.0" encoding="UTF-8"?>
<!-- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE -->
<!-- Version 2, December 2004 -->
<!-- Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> -->
<!-- Everyone is permitted to copy and distribute verbatim or modified -->
<!-- copies of this license document, and changing it is allowed as long -->
<!-- as the name is changed. -->
@pratul
pratul / gist:186297
Created September 13, 2009 19:32
A discussion on an SVG based presentation tool and editor
22:13 no_mind : so why not make a presentation cretor/manager based on SVG
22:13 lut4rp : web based?
22:13 no_mind : SVG provides you will all the features that you need in a slide including animation
22:14 no_mind : plus SVG will auto scale
22:14 lut4rp : Hmmm...
22:14 no_mind : same slide will work on desktop and web without any changes
22:14 PiyushK : html5++
22:14 lut4rp : I like it so far
22:14 lut4rp : :)
22:14 no_mind : any SVG viewer can be used
;;; ---------------------
;;; dot emacs
;;; Pratul Kalia (lut4rp)
;;; ---------------------
;;;
;; Mac full screen mode
;;;
(defun mac-toggle-max-window ()
(interactive)
;; smooth-scrolling.el
;; $Id: smooth-scrolling.el,v 1.8 2007/09/11 23:38:09 adam Exp $
;; Adam Spiers <emacs-ss@adamspiers.org>
;;
;; Make emacs scroll smoothly, keeping the point away from the top and
;; bottom of the current buffer's window in order to keep lines of
;; context around the point visible as much as possible, whilst
;; avoiding sudden scroll jumps which are visually confusing.
;;
;; This is a nice alternative to all the native scroll-* custom
The current situation is as follows:
Apple refuses to implement Ogg Theora in Quicktime by default (as used
by Safari), citing lack of hardware support and an uncertain patent
landscape.
Google has implemented H.264 and Ogg Theora in Chrome, but cannot
provide the H.264 codec license to third-party distributors of
Chromium, and have indicated a belief that Ogg Theora's quality-per-bit
is not yet suitable for the volume handled by YouTube.
;; ~/.emacs@foobar - Prashanth <munichlinux@gmail.com> -*- emacs-lisp -*-
;; --------------
;; Common Lisp
;; --------------
(require 'cl)
;; ---------------------
;; General Customisation
;; ---------------------
@pratul
pratul / gist:124797
Created June 6, 2009 10:28
git branch merge bug (works in hg and bzr)
>: git --version
git version 1.6.3.1
>: git init
Initialized empty Git repository in /Users/lut4rp/Code/tester/.git/
>: echo asdjhaskd >fil
>: git add fil
>: git cm 'initial commit'
[master (root-commit) 9983161] initial commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 fil