Skip to content

Instantly share code, notes, and snippets.

@WFreelandEcon
WFreelandEcon / barchart.rb
Created June 23, 2017 00:05 — forked from ttscoff/barchart.rb
Command line bar chart from JSON data (for GeekTool, et al)
#!/usr/bin/env ruby
# encoding: utf-8
# Brett Terpstra 2013, WTF license <http://www.wtfpl.net/txt/copying/>
# Outputs a vertical bar chart from date-based JSON data
# Requires the JSON rubygem: `[sudo] gem install json`
require 'date'
require 'open-uri'
require 'rubygems'
require 'json'
# coding: utf-8
import swizzle
from objc_util import *
import ctypes
import json, urllib
import uuid
import sys
import webbrowser
import urllib
def main():
path_to_source = "input.txt"
output_directory = "output/"
with open(path_to_source, 'r') as source:
lines = source.readlines()
for i, line in enumerate(lines):
with open("{}file_{}.txt".format(output_directory, i), 'w+') as output:
output.write(line)
@WFreelandEcon
WFreelandEcon / Launch Center Pro action menu
Created August 11, 2017 21:55 — forked from viticci/Launch Center Pro action menu
iOS bookmarklet for Launch Center Pro
javascript:window.location='launchpro://?url='+encodeURIComponent('launchpro://?url=[list:URL: ' +location.href+'|🔵 Tweetbot=tweetbot://viticci/post?text={{'+location.href+'}}|📌 Pinswift=pinswift://x-callback-url/add?url={{'+location.href+'}}|✅ To Check Out=drafts://x-callback-url/create?text={{'+location.href+'}}&action={{Stuff To Check Out}}|🔴 Reminder=fantastical2://parse?sentence={{'+location.href+'}}&reminder=1|🔒 Open In 1Password=op'+location.href+'|🔗 Clean Link=clean-links://x-callback-url/clean?url={{'+location.href+'}}]')
@WFreelandEcon
WFreelandEcon / make_bookmarklet.pl
Created August 12, 2017 04:11 — forked from gruber/make_bookmarklet.pl
JavaScript Bookmarklet Builder
#!/usr/bin/env perl
#
# http://daringfireball.net/2007/03/javascript_bookmarklet_builder
use strict;
use warnings;
use URI::Escape qw(uri_escape_utf8);
use open IO => ":utf8", # UTF8 by default
":std"; # Apply to STDIN/STDOUT/STDERR
@WFreelandEcon
WFreelandEcon / gist:c2084023d9f8ab26e91254169ac0a78b
Created September 1, 2017 15:52 — forked from ddeville/gist:dc6ba4346604ab4d6b65
Present the bookmark creation window in Spillo and populate it with the content from the frontmost tab in Safari
tell application "Safari"
set current_tab to current tab of front window
set tab_title to name of current_tab
set tab_address to URL of current_tab
tell application "Spillo"
show create bookmark panel with properties {url:tab_address, title:tab_title}
end tell
end tell
@WFreelandEcon
WFreelandEcon / gistodo.md
Created November 28, 2017 20:40
Dec_2017_Gistodo
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@WFreelandEcon
WFreelandEcon / url2mdlink.py
Created January 19, 2018 02:04 — forked from kspeeckaert/url2mdlink.py
Create a Markdown link from a URL, using the page's title as link description
@WFreelandEcon
WFreelandEcon / LICENSE.txt
Created January 19, 2018 15:54 — forked from kjaymiller/text_to_things3.scptd
AppleScript Import Text to Things3
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit