Skip to content

Instantly share code, notes, and snippets.

View karlhorky's full-sized avatar

Karl Horky karlhorky

View GitHub Profile
@karlhorky
karlhorky / variables.json
Created July 27, 2015 12:34
Dynamic JSON Schema Defaults
{
"title": "root",
"type": "object",
"definitions": {
"emailShareSubject": {
"type": "string",
"description": "Email share subject",
"minLength": 4
},
"emailShareSubjectCREDIT": {
@karlhorky
karlhorky / epub.sh
Last active August 29, 2015 14:27 — forked from ilyakava/epub.sh
Input an arg of a file of a list of links, get an output.epub of all those webpages concatenated
#!/bin/bash
COUNT=1
for link in $(cat $1)
do
wget -O - -o /dev/null $link | iconv -f iso8859-1 -t utf-8 > $COUNT.html
COUNT=$(echo $COUNT + 1 |bc)
done
@karlhorky
karlhorky / migrate-repo-to-lfs.sh
Last active February 28, 2019 07:42
Migrate existing design git repo to large file storage with history
git filter-branch --prune-empty --tree-filter '
git lfs track "*.ai"
git lfs track "*.psd"
git lfs track "*.eps"
git lfs track "*.jpg"
git lfs track "*.png"
git lfs track "*.svg"
git add .gitattributes
git ls-files -z | xargs -0 git check-attr filter | grep "filter: lfs" | sed -E "s/(.*): filter: lfs/\1/" | tr "\n" "\0" | while read -r -d $'"'\0'"' file; do
@karlhorky
karlhorky / gist.js
Created September 1, 2015 14:58
Copy to Clipboard
(function() {
top !== window && (alert("For security reasons, framing is not allowed."),
top.location.replace(document.location))
}
).call(this),
function() {
var t, e, n;
n = function(t) {
var e, n, r;
return e = $("meta[name=hostname]").attr("content"),
@karlhorky
karlhorky / api.json
Created October 25, 2015 11:55
saasquatch-cli API Configuration
{
"defaultResponse": {
"totalAccepted": 1,
"totalRejected": 0,
"accepted": [
{ "address": "[email protected]" }
],
"rejected": []
},
"exchanges": [
@karlhorky
karlhorky / install-xcode-command-line-tools.sh
Created November 20, 2015 19:24
Install the Command Line Tools completely from the command line
# Ref http://apple.stackexchange.com/questions/107307/how-can-i-install-the-command-line-tools-completely-from-the-command-line/195963#195963
touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress;
PROD=$(softwareupdate -l |
grep "\*.*Command Line" |
head -n 1 | awk -F"*" '{print $2}' |
sed -e 's/^ *//' |
tr -d '\n')
softwareupdate -i "$PROD" -v;
@karlhorky
karlhorky / github_comment_on_commit.py
Created November 21, 2015 08:50 — forked from rmcgibbo/github_comment_on_commit.py
Jenkins setup to automatically comment on github commits with build status
// Using the Jenkins Groovy Post build plugin to execute the following after every build
// https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin
// It would be nice not to have to specify these here... the repo name should be available within the hudson
// api somehow, but I didn't know how to get it. The access token should maybe be saved in a config file, and
// read in at runtime?
GITHUB_REPO_NAME = 'myusername/myreponame'
GITHUB_ACCESS_TOKEN = 'my_github_api_v3_access_token'
@karlhorky
karlhorky / channel_v3.json
Last active March 25, 2019 12:31
Sublime Text Package Control Channel JSON (from Internet Archive's backup on Jan 3, 2016)
{"dependencies_cache": {"https://packagecontrol.io/repository.json": [{"name": "python-jinja2", "description": "Python Jinja2 module", "load_order": "51", "releases": [{"sublime_text": "*", "platforms": ["*"], "url": "https://bitbucket.org/teddy_beer_maniac/sublime-text-dependency-jinja2/get/2.8.0.zip", "version": "2.8.0"}], "authors": ["teddy_beer_maniac"], "issues": "https://bitbucket.org/teddy_beer_maniac/sublime-text-dependency-jinja2/issues"}, {"name": "pyyaml", "description": "Python PyYAML module", "load_order": "50", "releases": [{"sublime_text": "*", "platforms": ["*"], "url": "https://codeload.github.com/packagecontrol/pyyaml/zip/v3.11.0", "version": "3.11.0"}], "authors": ["FichteFoll"], "issues": "https://github.com/packagecontrol/pyyaml/issues"}, {"name": "lxml", "description": "lxml", "load_order": "10", "releases": [{"sublime_text": ">=3000", "platforms": ["osx-x64", "linux-x64", "windows-x64"], "url": "https://codeload.github.com/eerohele/sublime-lxml/zip/0.2.0", "version": "0.2.0"}], "authors
@karlhorky
karlhorky / channel_v3.json
Created January 4, 2016 12:23
Sublime Text Package Control Channel JSON (backup from live system on Jan 4, 2016)
This file has been truncated, but you can view the full file.
{"schema_version": "3.0.0", "repositories": ["https://bitbucket.org/jjones028/p4sublime/raw/tip/packages.json", "https://bitbucket.org/klorenz/sublime_packages/raw/tip/packages.json", "https://csch1.triangulum.uberspace.de/release/packages.json", "https://packagecontrol.io/packages_2.json", "https://packagecontrol.io/repository.json", "https://raw.githubusercontent.com/20Tauri/DoxyDoxygen/master/DoxyDoxygen.json", "https://raw.githubusercontent.com/Andr3as/Sublime-SurroundWith/master/packages.json", "https://raw.githubusercontent.com/AutoIt/SublimeAutoItScript/master/packages.json", "https://raw.githubusercontent.com/FichteFoll/sublime_packages/master/package_control.json", "https://raw.githubusercontent.com/Floobits/floobits-sublime/master/packages.json", "https://raw.githubusercontent.com/Harrison-M/indent.txt-sublime/master/packages.json", "https://raw.githubusercontent.com/Hexenon/FoxCode/master/packages.json", "https://raw.githubusercontent.com/Kaizhi/SublimeUpdater/master/packages.json", "https://raw.gi
@karlhorky
karlhorky / include_when.twig
Last active February 4, 2016 07:47
Demo of potential include_when Twig tag
{% include_when {
'config.azubiTabs': 'azubi-tabs.twig'
} %}
{% include_when {
'config.footerUs': 'layouts/footer-us.twig',
default : 'layouts/footer.twig'
} %}