Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
javascript:(function()%7Bwindow.location.href%3D'https%3A%2F%2F12ft.io%2F'%2Bwindow.location.href%3B%7D)() |
// Core assets | |
let coreAssets = []; | |
// On install, cache core assets | |
self.addEventListener('install', function (event) { | |
// Cache core assets | |
event.waitUntil(caches.open('app').then(function (cache) { | |
for (let asset of coreAssets) { | |
cache.add(new Request(asset)); |
#!/bin/bash | |
if [[ $# -lt 1 ]]; then | |
echo "Usage: $0 somedir/*.jpg" | |
exit 1 | |
fi | |
files=($*) | |
let "i = $RANDOM % ${#files[*]}" | |
pick=${files[$i]} | |
echo "Draw: $pick" | |
open $pick |
-- LR imports | |
local LrApplication = import("LrApplication") | |
local LrApplicationView = import("LrApplicationView") | |
local LrBinding = import("LrBinding") | |
local LrDevelopController = import("LrDevelopController") | |
local LrDialogs = import("LrDialogs") | |
local LrExportSession = import("LrExportSession") | |
local LrFileUtils = import("LrFileUtils") | |
local LrFunctionContext = import("LrFunctionContext") | |
local LrLogger = import("LrLogger") |
class PgSearch::Document | |
belongs_to :article, -> {where("searchable_type = 'Article'")}, | |
foreign_key: 'searchable_id' | |
belongs_to :info, -> {where("searchable_type = 'Info'")}, | |
foreign_key: 'searchable_id' | |
end | |
@searched = PgSearch.multisearch(@query). | |
with_pg_search_highlight. |
declare module 'url-parse' { | |
interface Query { | |
[index: string]: string; | |
} | |
interface QueryParser { | |
(query: string): any; | |
} | |
interface ParsedUrl { |
This script will set up a hook to insert your git author information into the body of Subversion commit messages.
To set it up, cd
into your favorite git-svn repository and run the following command:
bash < <( curl -s -L https://gist.githubusercontent.com/gonzedge/8447840ed0e5710eb228/raw/set-up-git-svn-hooks.sh )
Enjoy!
config/projections.json
in your Rails app.~/.vim/bin/update
<3 <3 Grant for this.
I long for the day of JSON comments.
require 'jruby/profiler' | |
require 'jruby/profiler/callgrind_printer' | |
module CallgrindProfiler | |
def callgrind | |
unless JRuby.runtime.instance_config.is_profiling? | |
STDERR.puts 'Profiling not enabled, re-run with `ruby --profile.api`' | |
return | |
end |