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 | |
import os, re | |
from subprocess import call, Popen, PIPE | |
def run(command): | |
print 'Running:', command | |
p = Popen(command, shell=True, stdout=PIPE) | |
lines = p.stdout.readlines() | |
for line in lines: |
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
""" | |
Script to create an .ideavimrc comptabile VIM lockdown key-remapper as used by github.com/hiway/po | |
This will unmap EVERYTHING and render your VIM useless - the idea is to begin with your own keymapping instead of VIM's legacy keymaps. You may refer to github.com/hiway/po for more information. | |
To create a new .lockdown_ideavim: `python ideavimlockdown.py > ~/.lockdown_ideavim` | |
Then use it within your ~/.ideavimrc by adding "source ~/.lockdown_ideavim" within the file. | |
""" | |
excludes = [":", "\n", "!", chr(0x9), chr(0x16), " ", '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '(', ')', ','] |
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 | |
"""Fetch top X URLs for keywords from Google.""" | |
import click # [sudo] pip install click | |
import requests # [sudo] pip install requests | |
search_url = u'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=%s' | |
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
-- To use: telegram-cli -k tg-server.pub -s ohgodno.lua | |
-- | |
-- Remember to watch for your telegram ID in telegram-cli, update it below. | |
-- This script will let you message yourself, and will ignore messages from others. | |
telegram_id = 1234567 | |
message_echo = "" | |
function on_msg_receive (msg) | |
if msg.to.id == telegram_id and msg.from.id == telegram_id and msg.text ~= message_echo then |
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
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) |
OlderNewer