This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl -s http://www.wrldc.com/ | sed -n '/WR Grid Frequency/,/UI Rate/p' | sed -e 's#<[^>]*>##g' | sed 's/ / /g' | sed 's/UI Rate (Rs\/Unit)/ /g' | sed 's/ //g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
try: | |
import tweepy | |
except: | |
raise Exception('Install tweepy library first! (pip install tweepy)') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from Cocoa import * | |
from Foundation import * | |
from PyObjCTools import AppHelper | |
last_timestamp = time.time() | |
class AppDelegate(NSObject): | |
def applicationDidFinishLaunching_(self, aNotification): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
consumer_key = '' | |
consumer_secret = '' | |
access_token = '' | |
access_token_secret = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import appscript | |
itunes = appscript.app('itunes') | |
if itunes.isrunning(): | |
track = itunes.current_track() | |
status = "#music %s by %s" %(track.name(), track.artist()) | |
album = track.album() | |
if album: | |
status += " from %s" %(album) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Disable Autoplaying Youtube Advertisements on JustDial | |
// @namespace http://www.justdial.com | |
// @description Removes annoying advertisements. | |
// @include *.justdial.com/* | |
// ==/UserScript== | |
var yt_iframe = document.getElementById('adif'); | |
var parent = yt_iframe.parentNode; | |
parent.removeChild(yt_iframe); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1="[\u] \w/\n\$ " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django_filepicker.models import FPFileField | |
from south.modelsinspector import add_introspection_rules | |
add_introspection_rules([], ["django_filepicker\.models\.FPFileField"]) | |
class Stuff(models.Model): | |
preview = FPFileField(upload_to='previews', null=True, blank=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import requests | |
import json | |
import sys | |
def get_search_results(query): | |
url = "http://ajax.googleapis.com/ajax/services/search/web" | |
payload = dict( |
OlderNewer