Skip to content

Instantly share code, notes, and snippets.

View abdul's full-sized avatar
🎯
Focusing

Abdul Qabiz abdul

🎯
Focusing
View GitHub Profile
xquery version "1.0-ml";
declare variable $twitter-username as xs:string external;
declare variable $delicious-username as xs:string external;
declare variable $delicious-password as xs:string external;
declare function local:get-favorite-page($username,$page) {
xdmp:http-get(
fn:concat(
"http://api.twitter.com/1/favorites/",$username,".xml?page=",$page))[2] };
@abdul
abdul / gist:950911
Created May 1, 2011 21:49 — forked from agl/gist:876829
Proxy server for testing revocation
package main
import (
"encoding/line"
"fmt"
"io"
"net"
"strings"
)
@abdul
abdul / gist:3246116
Created August 3, 2012 09:06 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@abdul
abdul / Preferences.json
Created October 1, 2012 14:02 — forked from ericlbarnes/Preferences.json
Sublime Text Preferences
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"fade_fold_buttons": false,
"font_face": "Panic Sans",
"font_size": 12.0,
"highlight_line": true,
"line_padding_bottom": 4,
"line_padding_top": 4,
"rulers":
@abdul
abdul / file.html
Created October 6, 2012 03:43 — forked from igrigorik/file.html
Example of early head flush on load time
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Hello</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
Hello World
</body>
@abdul
abdul / Custom.css
Created October 6, 2012 03:48 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
#!/usr/bin/env python
# encoding: utf-8
from boto.s3.connection import S3Connection
AWS_ACCESS_KEY = '<aws access key>'
AWS_SECRET_KEY = '<aws secret key>'
AWS_BUCKET_NAME = '<aws bucket name>'
AWS_HEADERS = {
'Cache-Control':'max-age=31556926,public'
}
"""
IAM boto examples:
In this example we create a group that provides access
to all EC2 and S3 resources and actions and then add a
user to that group.
"""
import boto
#
# First create a connection to the IAM service
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
engine = create_engine("postgresql://user:@host/schema")
Base = declarative_base()
Base.metadata.reflect(engine)