Skip to content

Instantly share code, notes, and snippets.

View dgoodlad's full-sized avatar

David Goodlad dgoodlad

View GitHub Profile
AUTHOR="David Goodlad"
git log --shortstat --author="${AUTHOR}" \
| grep -E "fil(e|es) changed" \
| awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed: ", files, "lines inserted: ", inserted, "lines deleted: ", deleted }'
1 192.168.0.1 (192.168.0.1) 3.051 ms 2.626 ms 2.622 ms
2 lo-1-pe1-mel-dc2.firenet.net.au (119.63.216.220) 4.364 ms 4.416 ms 5.657 ms
3 ge-0-0-0-bdr1-mel-dc2.firenet.net.au (119.63.216.178) 6.145 ms 6.567 ms 6.893 ms
4 ge-0-0-1-672.bdr01.mel03.vic.vocus.net.au (114.31.197.145) 4.354 ms 4.737 ms 4.436 ms
5 ip-160.196.31.114.vocus.net.au (114.31.196.160) 172.790 ms 176.621 ms 173.927 ms
6 ip-159.196.31.114.vocus.net.au (114.31.196.159) 173.106 ms 172.897 ms 178.142 ms
7 ten-0-1-0-0.cor03.syd03.nsw.vocus.net.au (114.31.196.162) 172.850 ms 172.666 ms 172.896 ms
8 ten-0-5-0-1.cor01.syd04.nsw.vocus.net.au (175.45.72.118) 174.096 ms 172.357 ms 173.189 ms
9 ten-0-0-0-2.cor01.sjc01.ca.vocus.net (114.31.199.36) 176.281 ms 172.909 ms 177.183 ms
10 ten-0-3-0.bdr02.sjc01.ca.vocus.net (114.31.199.189) 172.436 ms
diff --git a/cmd-set-option.c b/cmd-set-option.c
index e561d03..65d6782 100644
--- a/cmd-set-option.c
+++ b/cmd-set-option.c
@@ -155,6 +155,7 @@ const struct set_option_entry set_window_option_table[] = {
{ "mode-mouse", SET_OPTION_FLAG, 0, 0, NULL },
{ "monitor-activity", SET_OPTION_FLAG, 0, 0, NULL },
{ "monitor-content", SET_OPTION_STRING, 0, 0, NULL },
+ { "other-pane-width", SET_OPTION_NUMBER, 0, INT_MAX, NULL },
{ "remain-on-exit", SET_OPTION_FLAG, 0, 0, NULL },
diff --git a/lib/ruote/engine/process_status.rb b/lib/ruote/engine/process_status.rb
index 7b5a470..9992403 100644
--- a/lib/ruote/engine/process_status.rb
+++ b/lib/ruote/engine/process_status.rb
@@ -67,7 +67,7 @@ module Ruote
@errors = errors.sort! { |a, b| a.fei.expid <=> b.fei.expid }
- @schedules = schedules.sort! { |a, b| a.owner.sid <=> b.owner.sid }
+ @schedules = schedules.sort! { |a, b| a['owner'].sid <=> b['owner'].sid }
Apparently JS has a tilde (~) operator. It's a unary operator that returns -(N + 1). So, using it and indexOf seems to give you a simple but unreadable test for substring detection. Since indexOf('stringthatisntthere') returns -1, the ~ operator turns that into -(-1 + 1) = -0 = 0, which is false. Otherwise, it'll always be true.
#!/usr/bin/env ruby
require 'rubygems'
require 'fsevents'
require 'json'
ignores = JSON.parse(File.read(".couchappignore")).map { |s| Regexp.new(s) }
ignores.push /(^.git|.DS_Store|\.swp$|\.couchappignore)/
appdir = File.expand_path(File.dirname(__FILE__))
[info] [<0.778.0>] 127.0.0.1 - - 'GET' /swift-ca/_design/swift/_view/schedules 200
=v-gradient(!top_color, !bottom_color, !midpoint_color = false, !midpoint = false)
@if !midpoint_color == false
!midpoint_color = !top_color / 2 + !bottom_color / 2
@if !midpoint == false
!midpoint = 50%
background: -webkit-gradient(linear, center top, center bottom, from(#{!top_color}), color-stop(#{!midpoint}, #{!midpoint_color}), to(#{!bottom_color}))
background: -moz-linear-gradient(top, #{!top_color}, #{!midpoint_color} #{!midpoint}, #{!bottom_color})