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 Dark Horse Downloader | |
// @namespace http://schiff.io/ | |
// @version 0.1 | |
// @description Download a DRM-free copy of your Dark Horse digital comics. | |
// @author Hayden Schiff (oxguy3) | |
// @match https://digital.darkhorse.com/read/* | |
// @match https://digital.darkhorse.com/bookshelf* | |
// @include https://*.cloudfront.net/*// ==UserScript== | |
// @name Dark Horse Downloader |
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
#!/usr/bin/bash | |
# Intended for use in your bashrc config | |
function reload-kubeconfigs { | |
# Combine kubeconfigs into ':'-delimited list as KUBECONFIG, which will be auto-merged by kubectl | |
local default="${HOME}/.kube/config" | |
local config_dir="${HOME}/.kube/config.d" | |
local config_paths="" | |
[[ ! -d "$config_dir" ]] && mkdir -p "$config_dir" |
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
function start_agent { | |
# Initialize new agent and add authentication | |
echo "Initialising new SSH agent..." | |
# Start authenticating daemon | |
# No authentications set up yet, just starting daemon! | |
ssh-agent | head -2 > ${SSH_ENV} | |
chmod 600 ${SSH_ENV} | |
# Find SSH_AUTH_SOCK and SSH_AGENT_PID of the available daemon |
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
# | |
# This shell prompt config file was created by promptline.vim | |
# | |
function __promptline_last_exit_code { | |
[[ $last_exit_code -gt 0 ]] || return 1; | |
printf "%s" "$last_exit_code" | |
} |
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
function blackConsole() { | |
document.querySelector(".console-output").style.backgroundColor = "black" | |
document.querySelector(".console-output").style.color = "white" | |
document.querySelector(".console-output").style.borderRadius = "5px" | |
document.querySelector(".console-output").style.padding = "10px 30px 30px" | |
} | |
window.onload = blackConsole |
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
//TEST DYNAMIC DISPATCH | |
trait TraitOne { } | |
abstract class TypeOne implements TraitOne { } | |
class TypeTwo extends TypeOne { } | |
def method(TraitOne _) { return 'traitOne' } | |
def method(TypeOne _) { return 'typeOne' } | |
def method(TypeTwo _) { return 'typeTwo' } | |
def method2(TraitOne _) { return 'traitOne' } |
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
function render-template { | |
local template=`cat "${1}"` | |
local command=$(echo -e "cat <<EOF\n${template}\nEOF\n") | |
cat << EOF | |
$(eval "${command}") | |
EOF | |
} |
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
#!/usr/bin/ruby | |
# Scrapes crude HTML representation of Worm (Parahumans) web serial chapters | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
# URL of first chapter | |
nextChapterUri = URI::encode("http://parahumans.wordpress.com/category/stories-arcs-1-10/arc-1-gestation/1-01/") |