Skip to content

Instantly share code, notes, and snippets.

View milothiesen's full-sized avatar
💓

Milo Thiesen milothiesen

💓
View GitHub Profile
from >> http://hints.macworld.com/article.php?story=20060209130749352
ls -R | grep ":" | sed -e 's/://' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
find . -type f | sed -e 's/.*\.//' | sed -e 's/.*\///' | sort -u
class Dog
attr_accessor :bark, :run
def initialize(bark, run)
@bark = bark
@run = run
end
end
class Pony
attr_accessor :gallop, :trot
// This script was written by CarlosCanto. I make no claim to this idea or code. I'm posting it here so I have easy access to it for my work -maile thiesen 8/4/2016
#target illustrator
// script.name = makeSelectedTextDynamic.jsx;
// script.description = makes SELECTED text Dynamic, creates Variables;
// script.required = one document with at leas one textFrame;
// script.parent = CarlosCanto // 2/15/13
// script.elegant = false;
// I make no claim to this idea or code. I'm posting it here so I have easy access to it for my work -maile thiesen 8/4/2016
// MultiExporter.js
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
//
// Exports Illustrator artboards and/or layers as individual PNG or PDF files
//
// Copyright 2011 Matthew Ericson
// Comments or suggestions to [email protected]
@milothiesen
milothiesen / ip_to_lat_lon.rb
Created August 11, 2016 20:02
A simple script that gets the user's public IP address and converts it to latitude and longitude coordinates using two APIs. ipify.org and ipapi.co
# A simple script that gets the user's public IP address and converts it to latitude and longitude coordinates using two APIs. ipify.org and ipapi.co
require "net/http"
ip = Net::HTTP.get(URI("https://api.ipify.org"))
puts "My public IP Address is: " + ip
convert_ip_to_lat_long = Net::HTTP.get(URI("https://ipapi.co/#{ip}/latlong/"))
puts "My lat long is: " + convert_ip_to_lat_long
@milothiesen
milothiesen / find_unique_file_two_arrays.rb
Created August 17, 2016 21:12
print out the names of unique files after scanning two directories
#!/usr/bin/ruby
dir1 = ARGV[0]
dir2 = ARGV[1]
dir1_arry = []
dir2_arry = []
dir1_files_list = %x[find #{dir1} -name "*"].split("\n")
dir2_files_list = %x[find #{dir2} -name "*"].split("\n")
@milothiesen
milothiesen / mediainfo raw language
Created October 5, 2016 15:03
This is the output of running "mediainfo --Language=raw" to find how to isolate individual fields and their values
#Examples of isolating specific fields and their values
#duration = %x[mediainfo --Inform="General;%Duration/String3%" '#{filepath}'].chomp!
#format = %x[mediainfo --Inform="General;%Format%" '#{filepath}'].chomp!
#commerical_name = %x[mediainfo --Inform="General;%Format_Commercial_IfAny%" '#{filepath}'].chomp!
#RAW OUTPUT from running "mediainfo --Language=raw filepath"
General
CompleteName : /Volumes/Drobo #2 2009-2012/AMNH Video/2009/2009-10-21 IncaRoad/Capture Scratch/2009-10-21_IncaRoadPhotoExhibit_JS/541_0251_01.mov
Format : MPEG-4
Format_Commercial_IfAny : XDCAM EX 35
@milothiesen
milothiesen / find_unique_codecs_vs6.rb
Last active October 14, 2016 14:56
Find all unique video codecs in specific directories - requires mediainfo
#developed by Maile Thiesen
#!/usr/bin/ruby
require 'json'
require 'time'
require 'nokogiri'
library_path = ARGV[0]
@milothiesen
milothiesen / vimeo_scraper_vs4.rb
Last active October 18, 2016 15:54
A Vimeo API Scraper that will look through all videos belonging to a specific user.
require 'json'
require 'httparty'
require 'csv'
output_counter = 0
video_info = []
(0..4).to_a.each do |p|
# puts "THIS IS PAGE #{p.to_i+1}"
user_id = "3045012" # substitute with the desired video ID