Skip to content

Instantly share code, notes, and snippets.

View trliner's full-sized avatar

Tim Liner trliner

  • Rio Norte Consulting
View GitHub Profile
@tsmith512
tsmith512 / ADJUSTMENTS.md
Last active May 7, 2016 00:34
Prop 1 in Austin. The diff view of ordinance 20160217-001, which is an amendment to rules governing TNC/Ridehailing applications. Use the "Revisions" tab to see the comparison.

To make the differences between the old ordinance and the new ordinance, I made a few adjustments to them to make the diff line up. Anything in red is being removed, anything in green is being added. Text in black and white is unchanged.

Renamed the DEFINITION section of the new ordinance to DEFINITIONS (plural) to match to show clearly where the real content begins. The new ordinance only has one definition.

Moved the PENALTY section from the end of the new ordenance to after DEFINITIONS to correlate to the original ordinance placement.

Renamed the TNC OPERATING AUTHORITY APPLICATION REQUIRED section of the new ordinance by removing the word "APPLICATION" to match the old ordinance.

In the IDENTITY section, replaced "app" in the new ordinance with "application" to match the old ordinance to demonstrate the similarity.

@ssaunier
ssaunier / redis_cloud_heroku_cli.rb
Created August 2, 2015 10:58
Connect to Heroku RedisCloud as `redis-cli`
#!/usr/bin/env ruby
url_matcher = %r{REDISCLOUD_URL:\s*redis://rediscloud:(\w+)@([\w\-.]+):(\d+)}
env_string = `heroku config | grep REDISCLOUD_URL`
env_settings = env_string.split('\n')
match_data = url_matcher.match(env_settings[0])
db = ARGV[0] || 0
@teeparham
teeparham / rdoc2md.rb
Last active November 7, 2023 00:47
Convert rdoc to markdown
require 'rdoc'
converter = RDoc::Markup::ToMarkdown.new
rdoc = File.read(ARGV[0] || 'README.rdoc')
puts converter.convert(rdoc)
# ruby rdoc2md.rb > README.md
# ruby rdoc2md.rb ABC.rdoc > abc.md
@stevenharman
stevenharman / _angularjs_and_rails_asset_pipeline.md
Last active April 30, 2016 23:20
Load the Angular.js $templateCache while building assets for Rails Asset Pipeline. Be sure in require the `templates` module as a dependency of your Angular.js app.

AngularJS + Rails Asset Pipeline

This is my hand-rolled solution for getting Angular assets (Controllers, Models, Directives, Templates, etc.) integrated into the Rails Asset Pipeline.

Templates and the $templateCache

Of particular note: this hack will also load the AngularJS $templateCache with your templates, while allowing you to use Slim, ERB, etc. to write your templates.