Skip to content

Instantly share code, notes, and snippets.

@5310
5310 / cellog.py
Created May 18, 2011 17:14
Cellog - The quick opportunistic hack that scrapes DSL usage stats from my router logs. #script
import urllib2, base64
import time
#THIS PARTICULAR SCRAPER WORKS ONLY ON MY BSNL TYPE-I TERACOM ROUTER
#variables here
@5310
5310 / ffmpeg-web-convert.bat
Created December 4, 2012 13:20
Commands for converting video files with FFMPEG into web-capable formats. For Windows, unfortunately, but can be trivially altered. #script
:: H.264
ffmpeg -i "%1" -b:v 1M -vcodec libx264 -pix_fmt yuv420p "%~dpn1.mp4" -y
:: WebM
ffmpeg -i "%1" -b 1M -f webm "%~dpn1.webm" -y
@5310
5310 / printnum.brainfuck
Created February 10, 2013 07:53
A brainfuck routine to print an integer as ascii, in minified and commented form. Needs two zeroed pointers following the value to be printed. Currently only prints single digit integers. Will fix later, but would need more pointers to work on, which makes me uncomfortable.
RESET
;; print integer as ascii ;;
;; put value on o0 ;;
;; needs o1~2 zeroed ;;
;; leaves o1~2 zeroed ;;
>>++++++++[<++++++>-]<<[>>+<<-]>>[<<+ >+>-]<.[-]<
RESET
@5310
5310 / googleplus_2013_singlecolumn_1000px.css
Last active September 7, 2017 13:04
Quick Userstyle I'm using for the I/O 2013 Google Plus interface. I personally found the multicolumn layout to be utterly useless on the desktop, and the single column was too narrow, so I widened it. Caveats: Images are still set to the width of the default stream, and hence would appear centered in widened posts. There's a commented out declar…
@-moz-document url-prefix("https://plus.google.com"), domain("plus.google.com") {
/* Post Channel*/
.Dla.Ebb.nqa {
width: 1000px !important;
}
.noa.Kv.Tc.Nl {
width: 100% !important
}
@5310
5310 / googleplus_2013_singlecolumn_widener.js
Created May 17, 2013 08:01
This quck userscript is for the I/O 2013 makeover of Google+, whose multicolumn layout I find illegible, and single column too narrow. It aims to fix the latter by widening the stream to a configurable amount, as well as tries to enlarge any post images to the best fit for the new width, and optionally allows stretching of every image to fit the…
// ==UserScript==
// @name Google+ I/O 2013 Theme Single Column Layout Widener [Configurable]
// @namespace http://5310.github.io/
// @version 0.1
// @description While the I/O 2013 makeover for G+ has been rather pretty, on the desktop, the multicolumn layout is illegible, and the single column is too narrow. This script contains styles to widen the single column layout, as well as tries to enhance any featured post images to the larger size if possible.
// @match https://plus.google.com/*
// @copyright WTFPL
// @run-at document-start
// ==/UserScript==
@5310
5310 / rightclickreplacement.ahk
Created July 20, 2013 06:12
This was the AutoHotkey script I was using on Windows when the right button on the mouse broke down. And then it suddenly got better. #script
AppsKey::
Send {RButton Down}
Return
AppsKey Up::
Send {RButton Up}
Return
CapsLock::
Send {RButton Down}
@5310
5310 / notepad-cc-cleaner.js
Created October 28, 2013 15:16
A (misleadingly verbose) bookmarklet that further cleans the already minimal Notepad.cc interface, locks the zoom, and smallifies the text for easier and horizontal-scroll-free editing in mobile browsers (for me, anyway). #bookmarklet #theme
javascript:(function(){document.getElementsByTagName('head')[0].innerHTML+='<meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">';document.getElementsByTagName('head')[0].innerHTML+='<style text="text/css"> #promo { display: none; } .stack, .layer_1, .layer_2, .layer_3 { top: 0; bottom: 0; left: 0; right: 0; } .layer_1, .layer_2, .layer_3 { top: 0 !important; bottom: 0 !important; left: 0 !important; right: 0 !important; } #contents { font-size: 0.8em; } #controls { height: 20px; bottom: 0px; font-size: 0.6em; } </style>'})();
@5310
5310 / kof_keyremap.ahk
Created October 31, 2013 08:25
This is the AutoHotkey key remaps I use for playing 2p KoF XIII on the same keyboard as I want. It is possible to do it in-game, but KoF Steam has a nigh-permanent bug that will not save these config. To use, just place in the same folder as the game and run. If you want to customize it, you have no other way than to customize it by hand. LP = J…
; launches KOFXIII
Run, .\kofxiii.exe
Sleep 1000
; repeatedly checks if KOFXIII has quit
SetTimer, close, 1000
; remaps keys
@5310
5310 / rtm-minimal-scio.css
Last active September 7, 2017 13:04
An userstyle for RTM to make it a bit more minimal and cluttered. Base userstyle used: http://userstyles.org/styles/15397/remember-the-milk-minimal So far, the attempt has been to change as little as possible to make the most added comfort. The toolbar widgets are as ugly as they are in RTM proper, and I will try to change them in the future. #t…
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("www.rememberthemilk.com") {
/*content font size*/
#midcontent {
font-size:1.1em !important;
}
/*width*/
@5310
5310 / hangout-maximize.js
Created January 2, 2014 11:21
Greasemonkey script that implements a shortcut to maximize Hangout's central region taken up by videos or "full" apps, in order to cover the entire page. #theme #userscript
// ==UserScript==
// @id greasemonkey-1b827958-e057-4e8c-83b6-eed2a66af1f5-hangout-maximizer
// @name Hangout Maximizer
// @version 0.1
// @namespace https://plus.google.com/hangouts/*
// @author Sayantan Chaudhuri
// @description This script implements a shortcut (ctrl+shift+f by default) that maximizes the central area of the Google Hangout web-app. Hangouts has no useful full-screen option to speak of, which is especially a problem while using apps like Screenshare or Roll20. This script simply hides every element other than the central area to maximize videos or apps being used. Doing so also hides the user pictures/videos, but that is expected behavior. The class-based selectors used in this script have been last checked to work on 2014/01/02.
// @include https://plus.google.com/hangouts/*
// @run-at document-end
// ==/UserScript==