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
# Show/hide hidden files | |
defaults write com.apple.finder AppleShowAllFiles TRUE;killall Finder | |
defaults write com.apple.finder AppleShowAllFiles FALSE;killall Finder |
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 | |
# Prints all lines that only contains the given letters. | |
# Matching is case insensitive. | |
# | |
# usage: scrabble.sh FILE ABC | |
DICTIONARY_FILE=$1 | |
CHARS_TO_USE=`echo $2 | tr '[a-z]' '[A-Z]'` | |
ALPHABET="ABCDEFGHIJKLMNOPQRSTUVXYZ" | |
FORBIDDEN_CHARS=`echo ${ALPHABET//[$CHARS_TO_USE]/}` |
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 | |
while true; do | |
adb pull $1 | |
filename=$(basename $1) | |
tail -50 $filename | |
sleep 2 | |
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
// | |
// UIWebView+Markdown.m | |
// DropTextwiki | |
// | |
// Created by Daniel Hjort on 6/5/11. | |
// Copyright 2011 Patchwork Solutions AB. All rights reserved. | |
// | |
#import "UIWebView+Markdown.h" | |
#import "html.h" |
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
NSURLCredentialStorage *sharedCredentials = [NSURLCredentialStorage sharedCredentialStorage]; | |
NSURLCredential *credential = [NSURLCredential credentialWithUser:@"user" password:@"pwd" persistence:NSURLCredentialPersistencePermanent]; | |
NSURLProtectionSpace *protectionSpace = [[[NSURLProtectionSpace alloc] initWithHost:@"my.gtdify.com" port:80 protocol:@"http" realm:nil authenticationMethod:NSURLAuthenticationMethodHTTPBasic] autorelease]; | |
[sharedCredentials setCredential:credential forProtectionSpace:protectionSpace]; |