Skip to content

Instantly share code, notes, and snippets.

View michaeldv's full-sized avatar

Michael Dvorkin michaeldv

  • Cupertino, California
View GitHub Profile
app = UIApplication.sharedApplication
NSLog "statusBarHidden #{app.statusBarHidden.inspect rescue nil}" # fails (documented)
NSLog "statusBarHidden? #{app.statusBarHidden?.inspect rescue nil}" # passes (undocumented)
NSLog "idleTimerDisabled #{app.idleTimerDisabled.inspect rescue nil}" # fails (documented)
NSLog "idleTimerDisabled? #{app.idleTimerDisabled?.inspect rescue nil}" # passes (undocumented)
NSLog "networkActivityIndicatorVisible #{app.networkActivityIndicatorVisible.inspect rescue nil}" # fails (documented)
NSLog "networkActivityIndicatorVisible? #{app.networkActivityIndicatorVisible?.inspect rescue nil}" # passes (undocumented)
### However:
class Controller
attr_reader :tag
def initialize
@tag = "Controller"
@window = Window.new(self)
@window.show
hello
hello_again
end
@michaeldv
michaeldv / coordinate.ante
Last active August 29, 2015 14:18
Ante scripts by Richard
# Ante script by Richard Notley
# Print N51°17.252W0°36.952\n
#
9♥ 3♥ 5♠ 8♥ # ♥ = 9 * 3 - 5 * 8 = 176 [°]
5♣ 4♠ # ♣ = 5 - 4 = 1
3♦ 6♥ # ♦ = 3 * 6 = 18
Q♦ # Label
A♣ 5♦ # ♣ = ♣ + 5 => increment ♣ by 5 (9 iterations from ♣ = 1) => ♣ = 46 [.]
A♦ 2♠ # ♦ = ♦ - 2 => decrement ♦ (counter) by 2
@michaeldv
michaeldv / maverick-1.5-osx.log
Created November 13, 2015 02:54
Maverick 1.5 build log on OSX
$ make
c++ -c -o bitboards.o bitboards.cpp
In file included from bitboards.cpp:16:
./procs.h:11:10: warning: calling convention '__stdcall' ignored for this target [-Wignored-attributes]
unsigned __stdcall engine_loop(void* pArguments);
^
bitboards.cpp:275:56: warning: integer constant is larger than the largest signed integer type
assert(cannot_catch_pawn_mask[BLACK][BLACK][G5] == 18446470308215914496);
^
/usr/include/assert.h:93:25: note: expanded from macro 'assert'