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
/** | |
* Created because RES's CSS style for inline code sucks in Night Mode and to remove some | |
* other minor annoyances | |
* | |
* Home: https://gist.github.com/nkmathew/354f2dc2849863201a30 | |
* Stylish Userstyle: https://userstyles.org/styles/119199/comfy-reddit-night-mode | |
* | |
* RES 4.6.0 was released on 10th January 2016 with completely new stylesheets for | |
* Night Mode making this user style somewhat obsolete. It'll only work well with | |
* v4.5.4 released 30th December 2014 and below |
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
*.html |
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 python3 | |
""" | |
Runs a simple HTTP Server locally on port 80 | |
Created to handle mime types not handled in http.server | |
Usage: | |
python -m MyServer | |
""" | |
import time |
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 python3 | |
""" | |
Date: 9th August 2015 | |
Author: nkmathew | |
A script for cloning all projects and gists from my Github account when I move to a | |
new environment | |
USAGE: |
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 | |
for i in `seq 1 1542`; do | |
rm index.html | |
wget http://xkcd.com/$i/ | |
IMG_URL=$(grep http://imgs.xkcd.com/comics/ index.html | head -1 | awk -F': ' '{print $2}') | |
IMG_NAME=$(echo $IMG_URL | awk -F'comics/' '{print $2}') | |
FULL_NAME="xkcd-$i-$IMG_NAME" | |
wget $IMG_URL -O $FULL_NAME | |
done |
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 | |
# | |
# A script for changing login/desktop/lockscreen backgrounds | |
RED="\033[0;31m" | |
NC="\033[0m" # No Color | |
XML_FOLDER=/usr/share/images/desktop-base | |
WIDTH=1920 | |
HEIGHT=1200 |
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
''' | |
@Started: 1st March 2014 1630 | |
@Completed: 5th March 2014 0800 | |
A hacked up script to help you survive through the Art of Assembly | |
Programming's rather awful formatting. | |
Alas, it has many flaws. It'll be helpful with only the most trivial of scripts. | |
''' |
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
;; @started: 19th February 2014 20:30 | |
;; @completed: 23rd February 2014 11:20 | |
;; Original C program | |
;; #include <stdio.h> | |
;; | |
;; void print_diamond(int width) { | |
;; /* | |
;; ** Every level is has two less or more characters than the next. |
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/python2.7 | |
## @Date: 21st February 2014, 16:00 | |
""" | |
This code is supposed to help you paste to www.pastebin.com from the command | |
line as a Guest does in the web interface. The old pastebin | |
api(www.pastebin.com/api_public.php) has been deprecated in favor of the new | |
one(www.pastebin.com/api) which requires an api_key that can only be obtained by a | |
registered user. |
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/python2.7 | |
import os | |
import sys | |
import platform | |
import subprocess | |
import re | |
""" | |
This program runs gcc/g++ on a cpp/c source file. It supposed to be used in |