Skip to content

Instantly share code, notes, and snippets.

<!-- https://rawgit.com/luqmaan/8e74871571ea56c6dfb7/raw/a1c23d40fcbed88cd095c7fba61177c989c5d00f/reddit_down.html -->
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<head>
<title>reddit is down</title>
<style>
@font-face {
font-family: 'SilkscreenNormal';
src: url('http://www.reddit.com/static/down/slkscr-webfont.eot');
function add(a, b) {
console.log(a + b);
}
function diff(a, b) {
console.log(a - b);
}
function l(x, y) {
x();
y();
@luqmaan
luqmaan / sass_to_scss.py
Last active August 29, 2015 13:59
Convert Sass to SCSS
import argparse
from pprint import pprint
import re
def count_leading_spaces(line):
return len(line) - len(line.lstrip(' '))
def sass_to_scss(sass_lines):

Keybase proof

I hereby claim:

  • I am luqmaan on github.
  • I am luqmaan (https://keybase.io/luqmaan) on keybase.
  • I have a public key whose fingerprint is DBF8 58BC 56FB CC2F 59D1 91A6 17DF AA03 72AC 4382

To claim this, I am signing this object:

POST http://www.capmetro.org/planner/s_nextbus2.asp with querystring
```
stopid:5868
route:801
dir:N
output:json
opt:2
min:1
```
@luqmaan
luqmaan / Preferences.sublime-settings
Created January 16, 2014 01:54
My Sublime Text settings ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Preferences.sublime-settings
{
"auto_match_enabled": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Solarized Color Scheme/Solarized (light).tmTheme",
"detect_indentation": false,
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"expand_tabs_on_save": true,
"find_selected_text": true,
"folder_exclude_patterns":
@luqmaan
luqmaan / sublime.json
Created January 14, 2014 22:14
Sublime Key Bindings / Shortcuts ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/Default\ \(OSX\).sublime-keymap
[
{"keys":["ctrl+k","ctrl+u"], "command":"toggle_setting", "args":{"setting":"line_numbers"}},
{"keys":["ctrl+k","ctrl+g"], "command":"toggle_setting", "args":{"setting":"gutter"}},
/* I wish this worked {"keys":["ctrl+k","ctrl+t"], "command":"toggle_setting", "args":{"setting":"show_tabs"}},*/
{"keys":["ctrl+k","ctrl+c"], "command":"toggle_setting", "args":{"setting":"draw_centered"}},
{"keys":["f5"], "command":"next_bookmark"},
{"keys":["f6"], "command":"prev_bookmark"},
{"keys":["shift+f5"], "command":"toggle_bookmark"},
{"keys":["shift+f6"], "command":"toggle_bookmark"},
{"keys":["super+alt+control+shift+f6"], "command":"clear_bookmarks"},
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/dir.h>
int main(int argc, char **argv) {
DIR* midir;
if ((midir=opendir(argv[1])) < 0) {
import time
import urllib
url = 'http://pub1.di.fm/di_classictrance'
filename = 'a.mp3'
time_limit = 10
starttime = time.time()
def callback(count, blocksize, filesize):
@luqmaan
luqmaan / GoSublime.sublime-settings
Created December 4, 2013 17:50
My GoSublime settings
{
// whether or not pkg files should be automatically saved when necessary (e.g. when running 9o `replay` or `go test` commands)
"autosave": false,
// Whether or not gscomplete(gocode) is enabled
"gscomplete_enabled": true,
// Whether or not gsfmt is enabled
"fmt_enabled": true,