Skip to content

Instantly share code, notes, and snippets.

View metaskills's full-sized avatar
🐙
Being Inkcellent to Each Other

Ken Collins metaskills

🐙
Being Inkcellent to Each Other
View GitHub Profile
@searls
searls / instructions.md
Created May 2, 2014 12:05
Creating a USB install disk of OS X Mavericks

Apple has changed how it distributes OS X Mavericks since its initial release in October 2013. This note was written on May 2, 2014. This affects the instructions you'll find online for how to make a bootable OS X installer.

It used to be that when you downloaded OS X from the App Store, the entire 5GB installer was placed in /Applications/Install OS X Mavericks.app. Now, there is a simple shortcut program placed in /Applications/OS X Mavericks.app. The app file is immediately removed in the event of an error or a successful post-install launch. When the download succeeds, the app file is launched which brings up the traditional install wizard, but this time mounted to /Volumes/Install OS X Mavericks.

I actually discovered this because if you already have a volume mounted of the same name (which I did, because I was trying to update my existing USB installer), the App Store download promptly fails right after finishing its download.

So if you have an empty disk you'd like to use as an installer that'

@searls
searls / gist:a644a89017022912b2c6
Last active August 29, 2015 14:11
Some thoughts on small teams and headquarters HQs

This is a simple little note I wrote down when talking to another company owner on the topic of moving a fully distributed team (with some folks in the same city) to a mostly-distributed team with an HQ office in a single city. It's not necessarily useful as general advice beyond that

why thoughtful physical location matters

I often advise clients that are actively focused on improving their teams to either embrace a fully-distributed team or a fully-colocated one, and to avoid other permutations of organization. Patterns that I see a lot:

  • small satellite offices off a large HQ
  • a handful of remote folk off a large HQ
  • n similarly-sized engineering offices
# encoding: utf-8
require 'odbc'
require 'odbc_utf8'
GC.disable
module ODBC
class Statement
def finished?
(global-set-key (kbd "M-s") 'save-buffer)
(global-set-key (kbd "M-z") 'undo)
(global-set-key (kbd "<escape>") 'hippie-expand)
(set-face-font 'default "-apple-inconsolata-medium-r-normal--13-0-72-72-m-0-iso10646-1")
(add-to-list 'default-frame-alist '(width . 100))
(add-to-list 'default-frame-alist '(height . 45))
(setq-default tab-width 2)
Setting Up A Local Port Repo:
http://journal.bitshaker.com/articles/2007/10/20/install-old-versions-of-ports-using-macports/
http://trac.macports.org/wiki/howto/InstallingOlderPort
1) Add this to /opt/local/etc/macports/sources.conf
file:///Users/kencollins/Repositories/ports [nosync]
2) mkdir /Users/kencollins/Repositories/ports
Topic.columns_hash['written_on'].sql_type # => "datetime"
Topic.columns_hash['bonus_time'].sql_type # => "time"
Topic.columns_hash['last_read'].sql_type # => "date"
Topic.count # => 4
data = Topic.connection.send(:select,"SELECT `topics`.* FROM `topics`")
row = data[0]
row['written_on'] # => 2003-07-16 10:28:11 UTC
row['written_on'].class # => Time
# result = @client.execute('SELECT 1 AS [one]')
# result.cancel
# result.cancel
write.c:136:tds_put_string converting 17 bytes of "SELECT 1 AS [one]"
write.c:164:tds_put_string wrote 34 bytes
util.c:162:Changed query state from QUERYING to PENDING
net.c:779:Sending packet
[datetime] => SYBDATETIME
61 1753-01-01T00:00:00.000 y:1753, m:1, d:1 h:0, m:0, s:0 MS:0 tz:1550134876
62 9999-12-31T23:59:59.997 y:9999, m:12, d:31 h:23, m:59, s:59 MS:997 tz:1550134876
63 2010-01-01T12:34:56.123 y:2010, m:1, d:1 h:12, m:34, s:56 MS:123 tz:1744847616
[smalldatetime] => SYBDATETIME4
231 1901-01-01T15:45:00.000Z days:365 minutes:945 (since 1/1/1900, since midnight)
232 2078-06-05T04:20:00.000Z days:65169 minutes:260 "
[datetime2_7] => SYBCHAR
71 0001-01-01T00:00:00.0000000Z 0001-01-01 00:00:00.0000000
Time.utc(1999, 12, 30, 23, 45, 00, 123000).strftime("%L") # => "123"
Time.utc(1999, 12, 30, 23, 45, 00, 123000).strftime("%3N") # => "123" millisecond (3 digits)
Time.utc(1999, 12, 30, 23, 45, 00, 123000).strftime("%6N") # => "123000" microsecond (6 digits)
Time.utc(1999, 12, 30, 23, 45, 00, 123000).strftime("%9N") # => "123000000" nanosecond (9 digits)
Time.utc(1999, 12, 30, 23, 45, 00, 123000).to_f # => 946597500.123
Time.utc(1999, 12, 30, 23, 45, 00, 123000).usec # => 123000
require 'date'
require 'rational'
ejb-mbp2:activerecord-sqlserver-adapter ebryn$ ruby test/benchmark/query_sqlserver.rb
-- create_table(:test_benchmarks, {:force=>true})
-> 0.0715s
Query Sqlserver
===============
Author: Erik Bryn
Date: October 19, 2010
Summary: Benchmark SQL Server Queries
System Information