Skip to content

Instantly share code, notes, and snippets.

View jamesmichiemo's full-sized avatar
☯️
casting lots

Mana jamesmichiemo

☯️
casting lots
  • University of North Carolina
View GitHub Profile
@jamesmichiemo
jamesmichiemo / gist:02ab49576bfbe6840094
Created February 17, 2016 19:38
el capitan puma install with homebrew openssl
gem install puma -- --with-opt-include=/usr/local/opt/openssl/include
@jamesmichiemo
jamesmichiemo / compress_foobar.sh
Created April 18, 2016 15:50
Compress and archive
tar cvzf foobar.tgz foobar
@jamesmichiemo
jamesmichiemo / extract_foobar.sh
Created April 18, 2016 15:51
Extract Archive
tar xvzf foobar.tgz
@jamesmichiemo
jamesmichiemo / flac_to_ogg.rb
Last active May 24, 2016 21:29
batch convert audio files using ffmpeg
Dir.glob("**/*.flac").each do |filename|
new_filename = File.join(
File.dirname(filename),
"#{File.basename(filename, ".flac")}.ogg")
`ffmpeg -i "#{filename}" -strict experimental -acodec vorbis -aq 100 "#{new_filename}"`
end
@jamesmichiemo
jamesmichiemo / rotate.rb
Created May 24, 2016 21:29
batch rotate images with imagemagick
Dir.glob("**/*.jpg").each do |filename|
new_filename = File.join(
File.dirname(filename),
"#{File.basename(filename, ".jpg")}-180.jpg")
`convert "#{filename}" -rotate 180 "#{new_filename}"`
end
@jamesmichiemo
jamesmichiemo / npm_example.sh
Created August 29, 2016 23:01
NPM commands
npm init # creates the package.json in the directory you're in
# At a minimum your package.json must have name and version number
# package.json will keep track of all the packages installed with a save flag
# eg:
npm install [email protected] --save
@jamesmichiemo
jamesmichiemo / ellipse.rb
Last active September 22, 2018 18:37
02_make::projects:processing
require 'propane'
# ellipses
# propane graffiti by 8mana
# based on code by Casey Reas and Ben Fry
class Ellipse < Propane::App
def settings
size 100, 100
@jamesmichiemo
jamesmichiemo / fonts.conf
Created October 30, 2018 18:39
system wide font install for ubuntu
# /etc/fonts/fonts.conf
...
<!-- Font directory list -->
<dir>/usr/share/fonts</dir>
<dir>/usr/local/share/fonts</dir>
<dir prefix="xdg">fonts</dir>
<!-- the following element will be removed in the future -->
<dir>~/.fonts</dir>
@jamesmichiemo
jamesmichiemo / 03_robot.rb
Created May 29, 2019 04:27
p5 the processing robot
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
# robot
# propane graffiti by 8mana
# based on code by Casey Reas and Ben Fry
class Robot < Propane::App
def settings
@jamesmichiemo
jamesmichiemo / 0301_draw_a_window.rb
Created May 30, 2019 13:57
processing sketches
#!/usr/bin/env jruby
# frozen_string_literal: false
require 'propane'
class WindowPane < Propane::App
def settings
size 800,600
end
end