Skip to content

Instantly share code, notes, and snippets.

View burhan's full-sized avatar
💻

Burhan Khalid burhan

💻
View GitHub Profile
@TomCan
TomCan / gist:9644966
Last active November 29, 2025 04:35
Inject drivers in Windows installation after motherboard change
Today, after working with Windows for over 15 years now, I finally came across the solution to the
dreadfull BSOD STOP 0x0000007B after replacing the motherboard of a computer, or after moving the
harddrive to another computer, or after doing a P2V, or after ... you get the point.
Requirements:
- Windows install / boot CD
- Chipset / Mobo / Storage drivers of the new motherboard or storage controller
Steps:
- extract all the drivers to a USB thumb drive
@mnadel
mnadel / go-oci8 on win64.md
Last active December 26, 2022 12:06
go-oci8 on windows64
@jbenet
jbenet / simple-git-branching-model.md
Last active December 7, 2025 19:59
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@mythz
mythz / 01_sudo.py
Last active December 18, 2015 04:09
Peter Norvig's Sudoku Solver ported to other languages
#full source: https://github.com/dartist/sudoku_solver/blob/master/benchmarks/sudoku.py
def cross(A, B):
"Cross product of elements in A and elements in B."
return [a+b for a in A for b in B]
digits = '123456789'
rows = 'ABCDEFGHI'
cols = digits
squares = cross(rows, cols)
def run_pg_fouine():
info = host_info[env.host_string]
db_name = info.tags.get('Name')
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf')
sudo('/etc/init.d/postgresql reload')
time.sleep(30)
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf')
sudo('/etc/init.d/postgresql reload')
run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt')
run('gzip -f /tmp/pgfouine.txt')
@davatron5000
davatron5000 / gist:2254924
Created March 30, 2012 20:57
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

@clyfe
clyfe / jars.txt
Created September 15, 2011 14:15
My solr jars and schema (1.4)
apache-solr-cell-1.4.0.jar jempbox-0.2.0.jar
asm-3.1.jar log4j-1.2.14.jar
bcmail-jdk14-136.jar nekohtml-1.9.9.jar
bcprov-jdk14-136.jar ooxml-schemas-1.0.jar
commons-codec-1.3.jar pdfbox-0.7.3.jar
commons-compress-1.0.jar poi-3.5-beta6.jar
commons-io-1.4.jar poi-ooxml-3.5-beta6.jar
commons-lang-2.1.jar poi-scratchpad-3.5-beta6.jar
commons-logging-1.1.1.jar tika-core-0.4.jar
dom4j-1.6.1.jar tika-parsers-0.4.jar
@jippi
jippi / rc.d
Created July 5, 2011 19:58 — forked from vvuksan/gist:988765
Logstash Init script
update-rc.d logstash-shipper defaults
update-rc.d logstash-reader defaults
@wallin
wallin / script.js
Created April 12, 2011 21:11 — forked from jacobk/script.js
$(function() {
$('div.content').live('showoff:show', function(evt) {
var bg_img = $('img[alt=background]', evt.target);
var old_bg = '';
if (bg_img.size() > 0) {
var src = bg_img.attr('src');
bg_img.hide();
// Set new background on body
old_bg = $('body').css('background-image');
$('body')
@mikeyk
mikeyk / redis_session_backend.py
Created April 8, 2011 18:01
A redis backend for Django Sessions, tested on Django 1.3+
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.conf import settings
from django.utils.encoding import force_unicode
import redis
class SessionStore(SessionBase):
""" Redis store for sessions"""
def __init__(self, session_key=None):
self.redis = redis.Redis(