Skip to content

Instantly share code, notes, and snippets.

View NOLFXceptMe's full-sized avatar
:octocat:

Naveen Molleti NOLFXceptMe

:octocat:
  • Amazon.com
  • Seattle
View GitHub Profile
@NOLFXceptMe
NOLFXceptMe / Makefile
Created June 5, 2010 11:34
Just a cheeky Makefile
love:
@echo "not war"
@NOLFXceptMe
NOLFXceptMe / NeedlemanWunsh.cpp
Created October 5, 2010 19:22
Needleman-Wusnch algorithm as specified on http://en.wikipedia.org/wiki/Needleman_wunsch
/* Needleman-Wusnch algorithm as specified on http://en.wikipedia.org/wiki/Needleman_wunsch */
#include<algorithm>
#include<iostream>
#include<string>
using namespace std;
string calcSeqAlignment(int S[4][4], int d, string seqA, string seqB);
#include<algorithm>
#include<iostream>
#include<string>
#include<utility>
#include<cmath>
using namespace std;
string BlockSeqAlignment(string seqA, string seqB);
pair<string, string> NeedlemanWunsch(string seqA, string seqB);
@NOLFXceptMe
NOLFXceptMe / tetris.clj
Created September 12, 2011 06:57 — forked from alexander-yakushev/tetris.clj
Tetris implementation in Clojure
(ns tetris.core
(:import (java.awt Color Dimension BorderLayout)
(javax.swing JPanel JFrame JOptionPane JButton JLabel)
(java.awt.event KeyListener))
(:use clojure.contrib.import-static deflayout.core
clojure.contrib.swing-utils)
(:gen-class))
(import-static java.awt.event.KeyEvent VK_LEFT VK_RIGHT VK_DOWN VK_UP VK_SPACE)
@NOLFXceptMe
NOLFXceptMe / vimium-keymaps-edit
Created October 23, 2011 10:33
Keymappings for Vimium to behave like Pentadactyl
unmap d
unmap u
map <c-f> scrollPageDown
map <c-b> scrollPageUp
unmap x
unmap X
map d removeTab
map u restoreTab
@NOLFXceptMe
NOLFXceptMe / youtube-history.py
Created April 20, 2012 21:49
Badly hacked together script to print the number of videos watched by 'Username'
#!/usr/bin/env python
# Naveen Kumar Molleti
# 21st April 2012
# Badly hacked together script to print the number of videos watched by 'Username'
# Dunno why but returns 1000000 for an a/c with a large history, must've missed something in the API doc
import httplib
import re
@NOLFXceptMe
NOLFXceptMe / .screenrc
Created June 22, 2015 11:35
'screen' configuration
hardstatus alwayslastline "%{=b}%{R} Screen(s): %{b}%w %=%{kG}%C%A %D, %M/%d/%Y "
startup_message off
defscrollback 10000
autodetach on
termcapinfo xterm* ti@:te@
def willis_pi(n):
pi = 2.0
for i in xrange(1, n):
k = 4 * i * i
pi = (pi * k)/(k-1)
print pi
@NOLFXceptMe
NOLFXceptMe / CorsSupport.scala
Created February 8, 2016 18:33 — forked from joseraya/CorsSupport.scala
CORS directive for Spray
package com.agilogy.spray.cors
import spray.http.{HttpMethods, HttpMethod, HttpResponse, AllOrigins}
import spray.http.HttpHeaders._
import spray.http.HttpMethods._
import spray.routing._
// see also https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
trait CORSSupport {
this: HttpService =>
Hi Gabor,
I am the original author of GNU grep. I am also a FreeBSD user,
although I live on -stable (and older) and rarely pay attention
to -current.
However, while searching the -current mailing list for an unrelated
reason, I stumbled across some flamage regarding BSD grep vs GNU grep
performance. You may have noticed that discussion too...