Skip to content

Instantly share code, notes, and snippets.

@maestrith
maestrith / Imgur_Upload.ahk
Last active December 19, 2015 10:59
Upload an image to Imgur: Instructions Below:
#SingleInstance,force
Menu,Tray,Add
Menu,Tray,Add,Grab,grab
return
grab:
Hotkey,LButton,select,On
Hotkey,RButton,Select,On
Hotkey,^F1,getinfo,On
return
getinfo:
@Infocatcher
Infocatcher / increaseDownloadCount.js
Last active December 16, 2015 05:49
Firefox: increase item count in built-in download panel(browser.download.useToolkitUI = false)
// https://gist.github.com/Infocatcher/5387328
// More: https://github.com/Infocatcher/Download_Panel_Tweaker
// (c) Infocatcher 2013, 2015
var itemCountLimit = 5;
// resource://app/modules/DownloadsCommon.jsm, see getSummary() function
if(DownloadsCommon._privateSummary)
DownloadsCommon._privateSummary._numToExclude = itemCountLimit;
if(DownloadsCommon._summary)
DownloadsCommon._summary._numToExclude = itemCountLimit;
var TU_hookCode = TU_hookMethod;
function TU_hookMethod(aStr) {
try {
var namespaces = aStr.split(".");
try {
var object = this;
while (namespaces.length > 1) {
object = object[namespaces.shift()];
}
@Infocatcher
Infocatcher / dontRememberClosedNewTabs.js
Last active December 11, 2015 13:48
Don't save closed "about:newtab" tabs in undo close history. Only tabs without back/forward history will be removed. You can create Custom Button with this code in initialization.
addEventListener("TabClose", function(e) {
function isNewTabURL(url) {
// See chrome://browser/content/utilityOverlay.js
return url == (window.BROWSER_NEW_TAB_URL || "about:newtab");
}
var tab = e.target;
var browser = tab.linkedBrowser;
if(!isNewTabURL(browser.currentURI.spec))
return;
var sh = browser.sessionHistory;
@awidegreen
awidegreen / vim_cheatsheet.md
Last active April 12, 2024 02:26
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@ryin
ryin / tmux_local_install.sh
Last active April 23, 2024 01:06
bash script for installing tmux without root access
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=1.8