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 imaplib | |
import re as regex | |
def getGmailUnread(username, password): | |
gmail = imaplib.IMAP4_SSL('imap.gmail.com','993') | |
gmail.login(username,password) | |
gmail.select() | |
unreadCount = regex.search("UNSEEN (\d+)", gmail.status("INBOX", "(UNSEEN)")[1][0]).group(1) |
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 | |
# DoubleMouse.sh - Multi-mouse config + button swap for X | |
$mousename = $1 | |
if [[ $1 == '--help' || $1 == '' || $1 == '-h' ]] | |
then | |
# Show help |
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
# Program to print string n times | |
# Usage: printLoop.py [string to print] [number of times to print] | |
import sys | |
scriptName, string, count = sys.argv | |
for i in range(0, count): | |
print string |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> <!-- Your presentation's title --> | |
<meta name="description" content=""> <!-- Describe your presentation --> | |
<meta name="author" content=""> <!-- Your name --> |
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
alignment top_left | |
# Set to yes/no to enable/diable background forking of conky process | |
background yes | |
# Set xy position | |
gap_x 0 | |
gap_y 0 | |
# Set size |
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 urllib2 | |
from bs4 import BeautifulSoup | |
import re | |
from random import randint | |
# Get quotes from bash.org | |
# Constants | |
TOP_100_URL = 'http://bash.org/?top' |
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
alignment top_left | |
background no | |
gap_x 0 | |
gap_y 0 | |
minimum_size 1024 1000 | |
maximum_width 50000 | |
update_interval 2 | |
total_run_times 0 | |
double_buffer yes |
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
class GravityCalculator(): | |
def __init__(self): | |
print('Do that yourself.') | |
GravityCalculator() |
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
# Path to your oh-my-zsh installation. | |
export ZSH=/home/bharadwaj/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="bullet-train" | |
# Uncomment the following line to use case-sensitive completion. |
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
function extract { | |
if [ -z "$1" ]; then | |
# display usage if no parameters given | |
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>" | |
else | |
if [ -f "$1" ] ; then | |
NAME=${1%.*} | |
#mkdir $NAME && cd $NAME | |
case "$1" in | |
*.tar.bz2) tar xvjf ./"$1" ;; |
OlderNewer