I hereby claim:
- I am sumardi on github.
- I am sumardi (https://keybase.io/sumardi) on keybase.
- I have a public key whose fingerprint is 6085 8A97 69AD 9949 30A5 D10F 80D7 1397 3FD6 D917
To claim this, I am signing this object:
$ sudo apt-get install libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev | |
$ sudo wget www.kernel.org/pub/linux/bluetooth/bluez-5.14.tar.xz | |
$ sudo unxz bluez-5.14.tar.xz | |
$ sudo tar xvf bluez-5.14.tar | |
$ cd bluez-5.14 | |
$ sudo ./configure --disable-systemd | |
$ sudo make | |
$ sudo make install |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
phoneIP: '192.168.1.100', | |
// set logs: '' to turn off logging | |
logs: '--logs', | |
shell: { | |
buildAndInstall: { | |
options: { | |
stdout: true, | |
stderr: true |
I hereby claim:
To claim this, I am signing this object:
sqlite2 path/to/olddb .dump > backupfile | |
sqlite3 path/to/newdb < backupfile |
// Override to allow orientations other than the default portrait orientation. | |
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { | |
// Return YES for supported orientations. | |
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); | |
} |
UIActionSheet *popupQuery = [[UIActionSheet alloc] initWithTitle:@"What to do?" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Remove" otherButtonTitles:@"Landscape", @"Portrait", nil]; | |
popupQuery.actionSheetStyle = UIActionSheetStyleBlackOpaque; | |
[popupQuery showInView:self.view]; | |
[popupQuery release]; |
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Really reset?" message:@"Do you really want to reset this game?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil] autorelease]; | |
[alert addButtonWithTitle:@"Yes"]; | |
[alert show]; |
- (void)viewDidLoad { | |
self.navigationItem.title = @"Title Here" | |
// for landscape mode use - CGRectMake(0.0, 0.0, 480, 44.0)]; | |
UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320, 44.0)]; | |
[imgView setImage:[UIImage imageNamed:@"navbar_bg.png"]]; | |
// this puts image view under all other views and all the default elements (title, buttons etc) | |
[self.navigationController.navigationBar insertSubview:imgView atIndex:0]; |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// Navigation bar | |
self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:.6 green:.3 blue:.2 alpha:1]; | |
// Search bar | |
self.searchDisplayController.searchBar.tintColor = [UIColor colorWithRed:.6 green:.3 blue:.2 alpha:1]; | |
} |
<?php | |
$browser = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27"; | |
function extract_user_agent($agent) | |
{ | |
$found = array(); | |
$pattern = "([^/[:space:]]*)" . "(/([^[:space:]]*))?"; | |
$pattern .= "([[:space:]]*\[[a-zA-Z][a-zA-Z]\])?" . "[[:space:]]*"; | |
$pattern .= "(\\((([^()]|(\\([^()]*\\)))*)\\))?" . "[[:space:]]*"; |