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
// the solution | |
// 1. declare the class Number(Int) | |
// 2. define method Number.inc(): Number | |
// 3. define method Number.dec(): Number | |
// 4. define getNumber():Int | |
class Number(val n : Int) { // n cannot be changed! | |
def inc(): Number = new Number(n + 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
This has been going on for 10 minutes now: | |
[eighth] (!) Irssi: Looking up irc.8thbridge.net | |
[eighth] (!) Irssi: Reconnecting to irc.8thbridge.net [184.106.113.202] port 6697 - use | |
/RMRECONNS to abort | |
(!) Irssi: warning SSL write error: Connection reset by peer | |
[eighth] (!) Irssi: Connection to irc.8thbridge.net established | |
(!) Irssi: warning SSL read error: server closed connection unexpectedly | |
[eighth] (!) Irssi: Connection lost to irc.8thbridge.net |
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
ry4an@ry4an:~/projects$ time hg clone mercurial mercurial.localclone | |
updating to branch default | |
964 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
real 0m5.908s | |
user 0m5.092s | |
sys 0m0.392s | |
ry4an@ry4an:~/projects$ time hg --config extensions.share= share mercurial mercurial.shareupdating working directory | |
964 files updated, 0 files merged, 0 files removed, 0 files unresolved |
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 | |
THIS_FOLDER=`dirname $0` | |
node=$1 | |
# What files have changed | |
files=`hg log --template="{files}" -r $node` | |
# Check each | |
for file in $files; do |
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 atexit | |
import os | |
import re | |
import readline | |
import rlcompleter | |
import socket | |
import _socket | |
import sys | |
import time | |
try: |
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
copy table_redshift from 'dynamodb:// table_dynamodb' | |
credentials 'aws_access_key_id=xxx;aws_secret_access_key=xxx' | |
readratio 50; |
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
Name Qty. No. Description Price | |
Darrel 1. Kid's Burger | |
One extra slice of cheese | |
Lettuce; Tomatoes; Pickles | |
Side Salad | |
Blue Cheese 6.88 | |
Delete | |
Tim 2. The Elevation Burger | |
One slice of cheese |
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
People keep /MSG-ing me non-secret things in IRC, so I assume everyone's doing it w/ one another too. Everytime someone /msg-s me I ask them to bring it up in the main channel instead, but that's not getting the message across, so: STOP IT. | |
The whole point of IRC is that there's huge benefit in everyone overhearing things that they're not currently working on. This is why IRC is 1000x better for a tech group than IM. There's incredible value in making things like "Oh, I did that at my last job, consider looking at X" or "Didn't I see you did something with Y last month?" possible, and all of that gets flushed down the drain when you /msg. | |
Don't worry about the channel getting too chatty. I'm in some channels w/ 200+ members and it works just fine. Your IRC client will figure it out. | |
There might be no immediate need for [Alice] to hear [Bob] and I discussing the finer points of dynamo throughput settings, but there's no harm in it and if at the end of the month the bill knocks her socks off she's goin |
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 | |
# adapted from http://stackoverflow.com/questions/422530/write-to-fifo-pipe-from-shell-with-timeout | |
case $# in | |
0) echo "Usage: `basename $0` message..." 1>&2 ;; | |
esac | |
{ | |
echo "$@" > /persistent/dramafever/phenny/irc/irc.freenode.net/#dramafever/in |
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
# | |
# Minimal CORS config for nginx | |
# | |
# A modification of https://gist.github.com/alexjs/4165271 | |
# | |
# NB: This relies on the use of the 'Origin' HTTP Header. | |
location /static { | |
if ($http_origin ~* (whitelist\.address\.one|whitelist\.address\.two)$) { |
OlderNewer