- Fly SEA-ANC: 9PM - 11:45 PM (3.5 hours)
- Hotel: Anchorage: Alex Hotel and Suites near the airport
This file contains 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
void main() { | |
print("Foo.".endsWithPeriod()); | |
print("foo. ".endsWithPeriod()); | |
print(" foo. ".endsWithPeriod()); | |
print("foo. Abc".endsWithPeriod()); | |
print("Abc".endsWithPeriod()); | |
print("".endsWithPeriod()); | |
} | |
extension StringExtension on String { |
This file contains 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
before_filter: allow_cors_requests | |
def allow_cors | |
headers["Access-Control-Allow-Origin"] = "*" | |
headers["Access-Control-Allow-Methods"] = %w{GET POST PUT DELETE}.join(",") | |
headers["Access-Control-Allow-Headers"] = %w{Origin Accept Content-Type X-Requested-With X-CSRF-Token}.join(",") | |
head(:ok) if request.request_method == "OPTIONS" | |
# or, render text: '' | |
# if that's more your style | |
end |
This file contains 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
;; Gist-ed from in https://github.com/arnab/emacs-starter-kit | |
(defun fontify-frame (frame) | |
(interactive) | |
(if window-system | |
(progn | |
(if (> (x-display-pixel-width) 2000) | |
(set-frame-parameter frame 'font "Inconsolata 19") ;; Cinema Display | |
(set-frame-parameter frame 'font "Inconsolata 16"))))) |
This file contains 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
# From inside a Rails root directory | |
# After you call save_and_open_page in Capybara (and you don't have or want launchy) | |
open -a "Google Chrome" "tmp/capybara/"`ls -tr tmp/capybara/ | head -2 | tail -1` |
This file contains 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
import java.io.Console; | |
public class NumberGuess { | |
private int small; | |
private int big; | |
private int guess; | |
private void guess(){ | |
this.guess = nextGuess(); | |
String verdict = System.console().readLine(guess + ": smaller/bigger/start-over? "); |
This file contains 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
#!/bin/bash | |
# --------------------------------------------------------- | |
# Customizable Settings | |
# --------------------------------------------------------- | |
# where to store the sparse-image | |
WORKSPACE=${HOME}/.workspace.dmg.sparseimage | |
# location where workspace will be mounted |
This file contains 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
defmodule Player do | |
def loop(name, other_player, phrase) do | |
receive do | |
{:serve} -> | |
IO.puts "#{name}: serving" | |
send(other_player, {:play_next, 1}) | |
loop(name, other_player, phrase) | |
{:play_next, rally_count} -> | |
:timer.sleep(700) | |
:random.seed(:os.timestamp()) |
This file contains 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
cat >> ~/.zshrc | |
function chpwd { | |
echo Hodor; | |
if type say > /dev/null; then | |
say Hodor; | |
fi | |
} | |
# then Ctrl + D |
NewerOlder