Skip to content

Instantly share code, notes, and snippets.

@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 / 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+'}}]')
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)
# coding: utf-8
import swizzle
from objc_util import *
import ctypes
import json, urllib
import uuid
import sys
import webbrowser
import urllib
@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'