-
Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.
-
Reset PS3 controller by inserting paperclip into pinhole near L2 button.
-
Connect PS3 controller to Mac with USB cable.
-
Enable Bluetooth.
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
fn main() { | |
let mut buffer = String::new(); | |
for i in 1..100 { | |
buffer = fizzbuzz(i, buffer); | |
println!("{}", buffer); | |
buffer.clear(); | |
} | |
} | |
fn fizzbuzz(i: u32, mut buffer: String) -> 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
$ cat ruby_mcache.stp | |
probe process("/usr/bin/ruby").mark("method__cache__clear") | |
{ | |
module = kernel_string($arg1) | |
if ($arg2) | |
file = kernel_string($arg2) | |
else | |
file = "<internal>" | |
line = $arg3 | |
printf("%s(%d) %s %s:%d cleared `%s'\n", execname(), pid(), $$name, file, line, module) |
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
f = -> h,k { h[k] = Hash.new(&f) } | |
h = Hash.new &f | |
data = { | |
"80e33bc0-1b9a-0130-d2fb-38f6b113e413:data:message:name" => "max", | |
"80e33bc0-1b9a-0130-d2fb-38f6b113e413:data:text" => "bla", | |
"80e33bc0-1b9a-0130-d2fb-38f6b113e413:data:message:line:x" => 123 | |
} | |
data.each do |path, v| |
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
# gem install guard; guard | |
guard 'django_tests' do | |
watch(%r{(.+)\.py}) do |m| | |
`django-admin.py test main` | |
end | |
end |