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
to_hex(List) when is_list(List) -> | |
to_hex(iolist_to_binary(List)); | |
to_hex(Binary) when is_binary(Binary) -> | |
<< <<(to_digit(Nibble1)):8,(to_digit(Nibble2)):8>> || <<Nibble1:4,Nibble2:4>> <= Binary >>. | |
to_digit(N) when N < 10 -> $0 + N; | |
to_digit(N) -> $a + N-10. |
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
#!/bin/bash | |
WaitForDown=true | |
while true; do | |
StoreUp=`curl -s http://store.apple.com/de | grep "Mac kaufen" | wc -l` | |
if [ $StoreUp -eq 0 ]; then | |
if $WaitForDown; then |
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
#if !defined(COMPARE) | |
#define COMPARE(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? NSOrderedAscending : (__a > __b ? NSOrderedDescending : NSOrderedSame); }) | |
#endif |
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
+ (NSString *)UUIDString { | |
CFUUIDRef myUUID = CFUUIDCreate(NULL); | |
NSString *myUUIDString = CFBridgingRelease(CFUUIDCreateString(NULL, myUUID)); | |
CFRelease(myUUID); | |
return myUUIDString; | |
} |
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
#!/usr/bin/env ruby | |
# == Synopsis | |
# blinkenpackets listens on a port for blinkenpackets and prints out verbose descriptions for them | |
# == Examples | |
# blinkenpackets.rb -p 2323 | |
# | |
# Other examples: | |
# blinkenpackets.rb proxy.blinkenlights.net:4244 | |
# blinkenpackets.rb proxy.blinkenlights.net:4245 |
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
#!/bin/sh | |
diskutil erasevolume HFS+ "BuildDisk" `hdiutil attach -nomount ram://9323440` |
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
#!/usr/bin/env ruby | |
require 'webrick' | |
require 'optparse' | |
include WEBrick | |
options = {:Port => 9090, | |
:DocumentRoot => './', | |
:Bonjour => false} | |
optparser=OptionParser.new do |opts| | |
opts.banner = "Usage: #{File.basename(__FILE__)} [options]" |
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
#!/bin/sh | |
rmdir /Volumes/BuildDisk | |
diskutil erasevolume HFS+ "BuildDisk" `hdiutil attach -nomount ram://4661720` |
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
while true; do curl -sS http://store.apple.com/de/iphone | grep "back soon" || (terminal-notifier -message "buy it" -title "Good news everyone" -open http://store.apple.com/de/iphone && say buy now && sleep 3600); sleep 10; done |
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
#if __clang__ | |
#define __NSX_PASTE__(A,B) A##B | |
#if !defined(MIN) | |
#define __NSMIN_IMPL__(A,B,L) ({ __typeof__(A) __NSX_PASTE__(__a,L) = (A); __typeof__(B) __NSX_PASTE__(__b,L) = (B); (__NSX_PASTE__(__a,L) < __NSX_PASTE__(__b,L)) ? __NSX_PASTE__(__a,L) : __NSX_PASTE__(__b,L); }) | |
#define MIN(A,B) __NSMIN_IMPL__(A,B,__COUNTER__) | |
#endif | |
#if !defined(MAX) |
OlderNewer