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
require 'nokogiri' | |
require 'fileutils' | |
require 'active_support/inflector' | |
def friendly_filename(filename) | |
filename.gsub(/[^\w\s_-]+/, '') | |
.gsub(/(^|\b\s)\s+($|\s?\b)/, '\\1\\2') | |
.gsub(/\s/, '_') | |
end |
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
// | |
// This server will start a bash shell and expose it | |
// over socket.io to a browser. See ./term.html for the | |
// client side. | |
// | |
// You should probably: | |
// | |
// npm install socket.io | |
// curl -O https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js | |
// |
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
Host * | |
ForwardAgent yes | |
ProxyCommand ~/bin/ssh-proxy.sh %h %p username@jump-host | |
ServerAliveInterval 10 | |
ServerAliveCountMax 600 |
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 static org.hamcrest.MatcherAssert.assertThat; | |
import static org.hamcrest.Matchers.equalTo; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.nio.charset.StandardCharsets; | |
import java.util.Arrays; |
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
-- Two dashes start a one-line comment. | |
--[[ | |
Adding two ['s and ]'s makes it a | |
multi-line comment. | |
--]] | |
---------------------------------------------------- | |
-- 1. Variables and flow control. | |
---------------------------------------------------- |
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
// ==UserScript== | |
// @name Indie Royale Bundle Labeler | |
// @include http://www.indieroyale.com/collection | |
// @updateURL https://gist.githubusercontent.com/markstinson/1606fa532246cb6d231d4719db03cebc/raw | |
// @downloadURL https://gist.githubusercontent.com/markstinson/1606fa532246cb6d231d4719db03cebc/raw | |
// @grant none | |
// @version 1.3.1 | |
// ==/UserScript== | |
// update with your username/checksum |
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
// ==UserScript== | |
// @name Humble Bundle key cache | |
// @include https://www.humblebundle.com/home* | |
// @updateURL https://gist.githubusercontent.com/markstinson/eb377c2c21b3b14c5676d375f619bdad/raw | |
// @downloadURL https://gist.githubusercontent.com/markstinson/eb377c2c21b3b14c5676d375f619bdad/raw | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// @run-at document-end | |
// @version 1.1.4 | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Desura Game Labeler | |
// @include http://www.desura.com/collection | |
// @updateURL https://gist.githubusercontent.com/markstinson/60fc05a31360e177283253237fa4c59a/raw | |
// @downloadURL https://gist.githubusercontent.com/markstinson/60fc05a31360e177283253237fa4c59a/raw | |
// @require https://gist.githubusercontent.com/markstinson/cbe66b990811db3346caab8eb2b39ef8/raw | |
// @grant none | |
// @version 1.2.2 | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name Indie Royale Bundle Hider | |
// @description Hides bundles you don't own from your collection page | |
// @include http://www.indieroyale.com/collection | |
// @updateURL https://gist.githubusercontent.com/markstinson/21f5e313004795f34632d2ede10b2c5b/raw | |
// @downloadURL https://gist.githubusercontent.com/markstinson/21f5e313004795f34632d2ede10b2c5b/raw | |
// @grant none | |
// @version 1.1.1 | |
// ==/UserScript== |
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
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |
OlderNewer