- Fix slow queries.
- Refactor code that's been bothering you.
- Extract an open source library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"os" | |
"time" | |
) | |
// Timestamp wraps time.Time and implements the json.Marshaller interface | |
// for presenting a timestamp in ISO8601 format. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://medium.com/@mkadenbach/boot2docker-together-with-virtualbox-guest-additions-da1e3ab2465c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f | xargs perl -pi -e 's/applicationX/applicationY/g' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Cause all query output to be piped to the OS X clipboard | |
\o | /usr/bin/pbcopy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install imagemagick | |
brew install ufraw | |
for infile in *.CR2; do convert $infile $(echo $infile|sed -n "s/CR2$/jpg/p"); done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rake' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_record' | |
require 'logger' | |
# Print out what version we're running | |
puts "Active Record #{ActiveRecord::VERSION::STRING}" | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
# Connect to an in-memory sqlite3 database | |
ActiveRecord::Base.establish_connection( :adapter => 'sqlite3', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(angular) { | |
'use strict'; | |
var module = angular.module('ngSubmitLoading', []); | |
/** | |
* A directive that adds a `$loading` attribute to the ngForm controller | |
* until the promise is fullfilled. | |
* | |
* @example |