Skip to content

Instantly share code, notes, and snippets.

View NewAlexandria's full-sized avatar
🍄
My responses are limited; you must ask the right questions.

NewAlexandria

🍄
My responses are limited; you must ask the right questions.
View GitHub Profile
@NewAlexandria
NewAlexandria / pr-template.md
Last active January 20, 2016 01:14
test dupe from sprintly's culture repo

z

What's this PR do?

Where should the reviewer start?

How should this be manually tested?

@NewAlexandria
NewAlexandria / chord.rb
Created January 1, 2016 07:02 — forked from DataKinds/chord.rb
circle modular multiplication chord renderer
# with reference to rendered output but the OP
# https://www.reddit.com/r/mathpics/comments/3yzu77/heres_an_animated_version_of_that_circular/
# and a video guide
# https://www.youtube.com/watch?v=qhbuKbxJsk8
require "rmagick"
RESOLUTION = 800
def localToGlobalCoords(n)
@NewAlexandria
NewAlexandria / selfie.rb
Created August 14, 2013 22:41
A file that reads from and writes to itself
#!/usr/bin/ruby
lines = IO.readlines($0) << (DATA.readlines << ARGV[0])
File.open($0, 'w') { |file| file.puts lines }
__END__
@NewAlexandria
NewAlexandria / index.html
Created March 25, 2013 21:29 — forked from anonymous/index.html
Fork of AnonPen cloth demo in JS
<canvas id = "c" > </canvas>
<p>
Tear the cloth with your mouse.<br><br>
Right click and drag to cut the cloth.<br><br>
Reduce physics_accuracy if it's laggy, increase it for a better effect.
</p>
@NewAlexandria
NewAlexandria / svn_mass_conversion.rb
Created March 24, 2013 20:18
And then there was this time I had to mass-convert svn repos..
#!/usr/bin/env ruby
require 'fileutils'
path_base = ARGV[0] || '~/Sources'
server_path = ARGV[1]
repo_list = ARGV[2] || 'svn_repo_list'
svn_dir = File.expand_path File.join(path_base,'/svn')
git_dir = File.expand_path File.join(path_base,'/git')
unless File.exists? auth_file
@NewAlexandria
NewAlexandria / mail_room.yml
Last active December 14, 2015 08:39
mail_room configuration experiments
---
:mailboxes:
-
:email: "my_gmail_user@gmail.com"
:password: "pasword"
:name: "inbox"
# :name: "BIZ/Career"
:delivery_method: logger
:log_path: "/var/www/rails/test_app/log/email.log"
# :delivery_url: "http://www.test_app.com/for/my_gmail_user/collect"
@NewAlexandria
NewAlexandria / launchctl_with_bundle.xml
Last active December 10, 2015 06:18
A LaunchCtl template for calling a rails app mechanism via `bundle exec`
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.myapp</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
@NewAlexandria
NewAlexandria / brew_inventory.rb
Created October 19, 2015 04:28
A quickie copypasta for getting your main brew packages
#!/usr/bin/env ruby
bl = `brew list`.split ;1
bdl = bl.reduce({}) {|h, pkg| h.merge({pkg => `brew deps #{pkg}`.split }) } ;1
bi = bl - bdl.values.flatten.sort
File.open('apps_brew.txt', 'w') {|f| f.write bi.join("\n") }
@NewAlexandria
NewAlexandria / DNA.md
Created November 28, 2012 20:14
Emoji art test

〰️ 〰️ 〰️ 〰️ 🔱 〰️ 〰️ 〰️ 〰️

〰️ 〰️ 〰️ 🔥 🌀 🍃 〰️ 〰️ 〰️

〰️ 〰️ 🔥 〰️ ☁️ 〰️ 🍃 〰️ 〰️

〰️ 〰️ 🔥 〰️ ⚡ 〰️ 🍃 〰️ 〰️

〰️ 〰️ 〰️ 🔥 🎶 🍃 〰️ 〰️ 〰️

@NewAlexandria
NewAlexandria / gemset_marhsalling.md
Created June 7, 2012 20:13
Marshaling Gemsets for Enterprise Gem Control

Problem Case

The situation arose where our Certifier gem would not bundle install Could not find gem 'rspec-core (= 2.5.1, runtime)' in any of the gem sources listed in your Gemfile.

Our gemserver (non-rubygems) only had

  • rspec-core-2.6.4.gem
  • rspec-core-2.8.0.gem

Analysis: someone had an old gem installed via rubygems, and didn't run bundle update when building the latest certifier. This used to be solved by maintaining the full-history of dependencies on our gemserver.