Milliseconds in your Timestamps.
We got 'em, you want 'em.
Shit needs to be PRECISE
MIT
// An intersting pattern for testing, but you can use the check anywhere | |
import "testing" | |
func TestCheckingChannel(t *testing.T) { | |
stop := make(chan bool) | |
// Testing some fucntion that SHOULD close the channel | |
func (stop chan bool) { | |
close(chan) | |
}(stop) |
Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
You know what method is being and you want to figure out how it got there. Raising an exception is a bit harsh since all you want is a stack trace
puts caller
Seriously. It's that easy. If you're getting too much information you could
Sometimes you need to iterate over a ton of items and you don't want the overhead of creating AR objects out of all of them. Hell, you only need a few things! Well, #pluck has your back.
But what if you want to iterate over many tonnes of items?
Pluck in batches to the rescue!
This isn't the exact code that I use in my code base, but it is damn close.
import os | |
import sys | |
import readline | |
import glob | |
class tabCompleter(object): | |
""" | |
A tab completer that can either complete from | |
the filesystem or from a list. | |
Bootstrap 3.0 gives you access to the awesome icon set icon set by these dudes but it's not obvious for a Rails newbie like myself to get it all working together nicely
RAILS_ROOT/vendor/assets/stylesheet/bootstrap-glyphicons.css
/dist/fonts
from the Bootstrap 3.0 download to a new folder in your Rails app RAILS_ROOT/vendor/assets/fonts
config.assets.paths << Rails.root.join("vendor","assets", "fonts")
to application.rb
after the line that has class Application < Rails::Application
.bootstrap-glyphicons.css
modify the the `urlIt's a collection of CSS styles and Javascript add-ons that stop your site from looking like a shitty craigslist rip off from 1996. Seriously, who wants that?
Docs: CSS, Components, Javascript
Finding the right gem, keeping it updated, and learning the syntax is a pain in the ass. Why not install Bootstrap the way you'd install new javascript libraries?
OS X Mavericks has some some seriously awesome dual screen support (Mutha-Fuckin' finally, AMIRITE?) but there seems to be a bug if you have your docked pinned to either side of your display.
Unfortunately, it means moving your dock :-(
Sad times my friends.