This file contains hidden or 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 XMonad | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Actions.CycleWS | |
import XMonad.Layout.Circle | |
import XMonad.Layout.MagicFocus | |
import XMonad.Layout.Tabbed | |
import XMonad.Prompt | |
import XMonad.Prompt.Ssh |
This file contains hidden or 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
set nocompatible | |
if has("gui_win32") | |
source $VIMRUNTIME/mswin.vim | |
behave mswin | |
endif | |
syntax on | |
set t_Co=256 |
This file contains hidden or 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
" Soft's .vimrc | |
" Useful plugins: indent-object, NERD_tree, NERD_commenter, delimitMate, | |
" snipMate, surround, Command-T, EasyMotion | |
" Nice colorschemes: Herald, Neverland, Mustang, Molokai | |
set nocompatible | |
if has("gui_win32") | |
source $VIMRUNTIME/mswin.vim | |
behave mswin |
This file contains hidden or 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
from install import * | |
packages= [ | |
Package(name="Vim", posix=[ | |
SymlinkTask("./.vimrc", "~/.vimrc") | |
]) | |
] | |
install(packages) |
This file contains hidden or 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
// ==UserScript== | |
// @name Google shortcuts | |
// @include http://www.google.*/search* | |
// @include https://encrypted.google.com/search* | |
// @description Adds useful shortcuts to Google search results page | |
// ==/UserScript== | |
(function(){ | |
var results = document.querySelectorAll("#ires>ol>li.g.w0"); | |
var activated = false; |
This file contains hidden or 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
// ==UserScript== | |
// @name Reddit mobile redirect | |
// @include http://m.reddit.com/* | |
// @description Redirects m.reddit.com addresses to the main site | |
// ==/UserScript== | |
window.location = window.location.href.replace(/^http:\/\/m\.(.+)/, "http://www.$1"); |
This file contains hidden or 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
// ==UserScript== | |
// @name Secure Wikipedia | |
// @include http://*/* | |
// @include https://*/* | |
// @description Changes links to Wikipedia articles to point to secure version | |
// ==/UserScript== | |
(function(){ | |
var links = document.getElementsByTagName("a"); | |
for (var i = 0; i < links.length; i++) { |
This file contains hidden or 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
// ==UserScript== | |
// @name Youtube comment remover | |
// @include http://www.youtube.com/watch* | |
// ==/UserScript== | |
(function() { | |
var comments = document.getElementById("watch-discussion"); | |
comments.parentElement.removeChild(comments); | |
}()) |
This file contains hidden or 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
// ==UserScript== | |
// @name Facebook Me gusta | |
// @include http://*.facebook.com/* | |
// @description Changes Like links to more appropriate "Me gusta" | |
// ==/UserScript== | |
Array.prototype.slice.call(document.querySelectorAll("button.like_link")).forEach(function (elem) { | |
elem.querySelector(".default_message").innerText = "Me gusta"; | |
elem.querySelector(".saving_message").innerText = "No me gusta"; | |
}); |
This file contains hidden or 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
#include <stdlib.h> | |
#include <stdio.h> | |
// 1h 26m 15s -> 5175 | |
unsigned int time_to_seconds(const char *str) { | |
const char *current = str; | |
unsigned int seconds = 0, number = 0; | |
while (*current) { | |
switch (*current) { | |
case 'h': |
OlderNewer