Skip to content

Instantly share code, notes, and snippets.

View akilism's full-sized avatar
💭
clicky-clicky-clicky

Akil Harris akilism

💭
clicky-clicky-clicky
View GitHub Profile
@akilism
akilism / all-lein-templates.txt
Created July 2, 2016 19:18 — forked from anonymous/all-lein-templates.txt
for i in {1..28} ; do lein search lein-template $i ; done | grep '^\[' | perl -pe 's,^\[,,; s,/.*?],:,' | sort | uniq -c | tee all-lein-templates.txt
1 acorn: A Leiningen template for a ClojureScript setup with Figwheel, Austin, Om.
8 amp: Leiningen template for AMP (Alfresco Module Package) projects.
1 angular-cl2: A Leiningen template for using AngularJS and ChlorineJS
1 angular: Clojure and AngularJS in perfect harmony.
6 angular: Clojure and AngularJS in perfect harmony. $ lein new angular <name>
2 angularjs-app: Leiningen template for web application with http-kit and angularjs
5 angular-simple: Clojure and AngularJS $ lein new angular-simple <name>
1 aperiodic-cljs: My cljs development starting point. Basically ripped from lein-cljsbuild.
1 apijr: clojurescript project template
1 appfgo: 'lein new' template for Funcgo application
@akilism
akilism / gist:e33e84faafee96a1dec50eacc474e39b
Created August 3, 2016 21:03
file extensions in a directory
find . -type f | perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u
@akilism
akilism / gist:bd6cffc31153e6bfbeda49ed399731a3
Created August 4, 2016 18:51
replace " " in filenames with _
find ./ -depth -name "* *" -execdir rename 's/ /_/g' "{}" \;
@akilism
akilism / gist:0e390ee8e6850b5ad8e9409d7d54ddca
Created August 18, 2016 20:51
find files in directories based on a file of filenames
for FILE in $(cat filenames.txt); do find ./ -iname $FILE; done;
@akilism
akilism / gist:d5353dc823897588ef756e724a21be2d
Created September 1, 2016 13:26
Sort the lines of text in your OS X clipboard and copy the result back to your clipboard:
pbpaste | sort | pbcopy
@akilism
akilism / docker-exec-sql.sh
Last active September 6, 2016 20:58
docker sql cmd
docker exec container-name psql -U user -d db-name -c "some sql"
@akilism
akilism / installation.md
Created February 4, 2017 03:11 — forked from guillaumevincent/installation.md
A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.

Guide to install PyQt5 on Mac OS X with python 3.4 virtualenv

Description

A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.

Requirements

  • xcode 5.1.1
  • python 3.4.0
  • Qt libraries 5.2.1
@akilism
akilism / gist:888d819bad2340b52ed4997a50278890
Last active February 24, 2017 19:08 — forked from jordelver/gist:3073101
Set the Mac OS X SOCKS proxy on the command line

Set the Mac OS X SOCKS proxy on the command line

a.k.a. what to do when your ISP starts blocking sites :(

Set the SOCKS proxy to local SSH tunnel

networksetup -setsocksfirewallproxy "Ethernet" localhost 8080

To clear the domain and port

@akilism
akilism / exploding-bunny-regl.js
Created June 4, 2017 16:34
jam-3-exploding-bunny-regl
const regl = require('regl')();
const mat4 = require('gl-mat4');
const fNormals = require('face-normals');
const unindex = require('unindex-mesh');
const bunny = require('bunny');
const pos = unindex(bunny);
const draw = regl({
frag: `
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 11 columns, instead of 10 in line 9.
week,date,time_start,time_end,duration,listed_title,top_category,listed_location,listed_project_officer,detail_category,notes
1,2018-11-07,08:00,11:00,3,Executive time,executive_time,Oval office,,executive_time,
1,2018-11-07,11:00,11:30,0.5,Meeting with the chief of staff,meeting,Oval office,,cos_meeting,
1,2018-11-07,11:30,12:30,1,Executive time,executive_time,Oval office,,executive_time,
1,2018-11-07,12:30,13:30,1,Lunch,lunch,Private dining room,,solo_lunch,
1,2018-11-07,13:30,17:00,3.5,Executive time,executive_time,Oval office,,executive_time,
1,2018-11-08,08:00,09:30,1.5,Executive time,executive_time,Oval office,,executive_time,
1,2018-11-08,09:30,09:40,0.1666666667,Depart the White House en route to Supreme Court of the United States,travel,,,domestic_travel,
1,2018-11-08,09:45,09:55,0.1666666667,Meet and greet with the supreme court justices,event,"Washington, DC",Emmet Flood,meet_greet,
1,2018-11-08,10:00,10:15,0.25,Investiture of the honorable Brett Kavanaugh,event,"Washington, DC",Emmet Flood,kavanau