Skip to content

Instantly share code, notes, and snippets.

💭
💻 🎨 🎵

Joseph Wilk josephwilk

💭
💻 🎨 🎵
Block or report user

Report or block josephwilk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View profit->gdp.clj
(set-env!
:dependencies '[[boot/core "2.8.2" :scope "provided"]
[boot/pod "2.8.2" :scope "provided"]
[boot/base "2.8.2" :scope "provided"]
[http-kit "2.2.0"]
[enlive "1.1.6"]
[cheshire "5.7.1"]
[clojure-csv/clojure-csv "2.0.1"]
[clj-time "0.13.0"]
[org.clojure/core.match "0.3.0-alpha4"]
View words.sh
$2 = /usr/share/dict/words
#Fetch binary data
wget $1 -O data
#convert into strings
strings data | sed 's/\([A-Z]\)/ \1/g' | sed 's/[^a-zA-Z]//g'| tr '[:upper:]' '[:lower:]' | tr -s '[:blank:]' '\n' > strings.txt
#Find dictionary words in data
awk 'length > 2' strings.txt > strings.big.txt
awk 'FNR==NR{dict[$1]++;next} {for(i=1;i<=NF;i++)if(!($i in dict))next}1' /usr/share/dict/words strings.big.txt | uniq > words.txt
@josephwilk
josephwilk / gist:41042
Created Dec 28, 2008
Cucumber ANTLR grammar
View gist:41042
grammar Gherkin;
//options {
// language=Ruby;
//}
feature : NEWLINE* comment? NEWLINE* SPACE* tags? NEWLINE* SPACE* feature_keyword SPACE* line_to_eol NEWLINE+ (feature_elements .)* feature_elements ;
fragment
feature_elements
View console_log.cs
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class LoggingTextUpdate : MonoBehaviour
{
public Text label;
public static string _msg = ">";
public static string _oldmsg = "";
@josephwilk
josephwilk / vst.el
Last active Feb 21, 2018
Render readonly bars for floats.
View vst.el
(defconst MAX-LENGTH 100)
(defun vst-update-all ()
(interactive)
(save-excursion
(goto-char (point-min))
(let ((inhibit-read-only t))
(remove-text-properties (point) (point-max) '(read-only t)))
(while (re-search-forward "sop2_cc .+:\s*\\([0-9]*.[0-9]+\\)\n" nil t)
(let ((full (round (* MAX-LENGTH (string-to-number (match-string 1))))))
View keybase.md

Keybase proof

I hereby claim:

  • I am josephwilk on github.
  • I am josephwilk (https://keybase.io/josephwilk) on keybase.
  • I have a public key whose fingerprint is AB37 F601 DDE3 04A3 EE15 0A06 2C72 1C7E 7C0D DA22

To claim this, I am signing this object:

View gist:5808525
defmodule Bench do
@sample 1000
defp average(time) do
time / @sample
end
defp bench(fun) do
f = fn ->
Enum.each 1..@sample, fn _ -> fun.() end
View 1470683054969.edn
{:counter 2, :change-iterations 0, :settings ({:wave-base 6, :duration (6 2 6 4 4 4 2 2 2 6 2 6 4 2 6 4 2 6 6 4 4 2 6 6 6 4 4 6 2 6 2 4 6 2 6 6 4 2 6 4 6 4 6 6 4 2 4 6 6 4 4 2 4 2 6 6 2 6 6 6 6 6 2 2 6 2 6 2 4 6 6 6 4 4 6 6 4 4 4 6 2 2 6 6 2 4 6 6 4 4 2 2 2 4 2 6 4 4 6 2 4 6 2 4 2 4 4 4 6 2 4 6 2 2 2 4 6 4 2 6 2 2 2 2 4 2 2 6 4 2 6 6 4 2 2 6 6 2 6 6 6 4 4 6 6 4 6 4 4 2 4 4 4 2 4 4 6 4 2 2 4 2 6 2 2 2 6 6 6 6 6 4 4 6 4 4 2 4 2 4 6 6 6 4 2 2 4 6 2 4 2 4 6 6 4 4 6 4 4 4 4 6 2 6 6 6 2 6 6 4 2 2 2 6 4 2 6 2 2 4 6 6 6 2 2 6 4 2 6 6 6 2 2 2 2 4 2 2 6 4 2 6 4 4 4 2 2 4 2 2 4 6 6 2 6 4 4 2 2 2 2 4 2 2 2 6 2 2 6 6 6 6 6 2 4 4 2 2 4 6 4 4 6 2 4 4 4 4 2 6 2 2 6 4 4 2 2 6 2 4 6 6 6 2 4 4 6 2 2 6 2 4 4 4 2 6 6 6 2 4 2 4 2 6 6 6 2 4 4 6 2 2 4 6 4 2 4 2 2 2 6 2 2 4 2 6 2 6 2 4 4 6 2 2 6 2 2 6 4 6 4 4 6 4 4 6 2 4 6 4 6 4 4 2 6 4 6 2 2 2 6 4 6 4 4 4 2 4 2 2 2 2 6 4 2 6 2 6 2 6 4 2 6 2 6 2 2 2 4 2 2 2 2 4 4 4 6 4 2 2 2 4 2 4 4 6 6 4 2 4 4 4 6 4 4 6 2 6 6 4 6 2 2 2 2 6 2 2 2 4 2 6 2 6 4 2 2 6 2 2 4 2 4 4 6 4 4 4 6 2 2 2 2 2 4 4
View state.edn
{:counter 4, :change-iterations 0, :settings ({:wave 0, :clock 4.0, :score (52 60 48 40 64 48 55 43 59 43 69 42 60 45 38 59 52 72 59 42 64 45 50 55 31 66 36 48 35 47 48 35 74 36 72 52 62 48 59 42 52 60 47 71 48 74 64 45 72 62 35 74 76 67 64 52 60 69 71 74 74 47 66 48 57 48 66 71 52 38 69 47 54 40 52 54 69 43 76 52 64 42 66 50 69 33 59 31 76 72 48 42 52 52 76 76 74 36 42 40 36 38 59 59 64 59 66 59 76 52 42 52 40 76 47 62 55 67 66 55 66 74 69 72 74 48 50 54 64 31 47 57 76 59 43 64 55 59 50 72 45 62 69 47 74 62 66 76 47 60 66 48 67 64 74 33 64 48 42 54 59 40 52 42 50 74 50 69 54 33 64 74 45 76 66 64 43 45 52 52 59 69 40 35 52 60 69 59 45 72 64 59 40 52 35 60 76 40 54 64 69 42 35 45 47 76 71 43 62 62 52 54 52 42 45 64 60 38 66 47 45 62 67 40 69 35 71 42 76 76 42 76 72 48 71 67 42 64 45 40 42 36 72 48 42 48 38 69 72 69 76 54 64 43 60 60 60 52 42 74 72 47 30 47 40 52 31 40 62 66 43 52 28 59 60 64 47 71 69 40 69 72 30 50 38 40 74 43 67 64 64 35 55 57 76 50 31 40 35 50 76 52 71 48 62 69 40 54 64 48 57 76 72 59 55 59
View gist:8196988
dir = File.dirname(File.expand_path(__FILE__))
$LOAD_PATH.unshift dir + '/../lib'
require 'midi-jruby'
MIDIJRuby::Input.first.open do |input|
while true do
m = input.gets
$>.puts(m.inspect)
end
You can’t perform that action at this time.