This file contains hidden or 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
Setup zoals ik het voor vader heb gemaakt: | |
Telenet (POP) | |
Een nieuwe gmail account (IMAP) | |
In die gmail account kan je opzetten dat hij ook een POP-account moet leegtrekken (dus ook de nieuwe mail altijd ophaalt). Vanaf nu komt al die Telenet-mail ook binnen op je gmail. | |
Nu kan je in gmail ook opzetten dat je vanaf een ander adres wilt versturen (dus hier gebruik je terug je Telenet adres als verzender). Nu lijkt het voor de buitenwereld of je op die Telenet account zit maar kan je wel gebruik maken van alle goodies van Gmail (IMAP, degelijke webmail, goede iPhone support) en heb je ook nog als bijkomend voordeel (stel dat je de gmail geheim houdt) dat je heel vlot kunt wisselen van email-adres (je mail blijft dan op hetzelfde (geheime) adres). |
This file contains hidden or 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 'rubygems' | |
require 'open-uri' | |
require 'hpricot' | |
doc = open("http://news.bbc.co.uk/sport2/hi/other_sports/snooker/8620811.stm") { |f| Hpricot(f) } | |
puts (doc/"td.storybody").at("p:nth(4)").to_plain_text |
This file contains hidden or 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
We (http://10to1.be) 're heavy github users so I'm going to inlcude them in the workflow (feel free to replace them with another server). | |
Github repo is containing the project | |
1. Make sure you are in the master branch | |
2. Do a pull. | |
3. Create a branch to do your work in (git checkout -b "solving_the_bug") | |
4. Do your work. | |
5. Switch back to the master branch (git checkout master) | |
6. Do a pull (git pull) --this to make sure the master branch is up to date. |
This file contains hidden or 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 'rubygems' | |
require 'open-uri' | |
require 'hpricot' | |
doc = open("http://www.lvzc.be/charronline/2010/klassement_benelux.php?list=standaard") { |f| Hpricot(f) } | |
def print_nicely(tr) | |
current_standing = tr.at("td:nth(0)").inner_html | |
name = tr.at("td:nth(1)").inner_html |
This file contains hidden or 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
function xauth(){ | |
NONCE=`head -n 64 /dev/urandom | env LC_CTYPE=C tr -dc 0-9 | cut -c1-64` | |
TIMESTAMP=`date +%s` | |
# signature base string | |
# POST&https%3A%2F%2Fapi.twitter.com%2Foauth%2Faccess_token&oauth_consumer_key%3Dri8JxYK2ZdwSV5xIUfNNvQ%26oauth_nonce%3DqfQ4ux5qRH9GaH8tVwDCwInLy6z8snR6wiq8lKcD6s%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1267817662%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth%26x_auth_password%3Dxyz12242134%26x_auth_username%3Depisod | |
consumer_key="6tV0bqiCWFPVQDSqUW6kMw" | |
consumer_secret="wnqkvIv9AMeeFoWJttIhRXxPQNewRXNs2bAYa6j8U" | |
key="${consumer_secret}&" |
This file contains hidden or 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
#ifndef __IPHONE_3_0 | |
#warning "This project uses features only available in iPhone SDK 3.0 and later." | |
#endif | |
#ifdef DEBUG | |
#define DLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__]) | |
#define ALog(...) [[NSAssertionHandler currentHandler] handleFailureInFunction:[NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding] file:[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lineNumber:__LINE__ description:__VA_ARGS__] | |
#else | |
#define DLog(...) do { } while (0) | |
#ifndef NS_BLOCK_ASSERTIONS |
This file contains hidden or 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/ruby | |
# update_version.rb | |
# | |
# Created by Piet Jaspers on 23/07/10. | |
# Copyright 2010 10to1. All rights reserved. | |
require "rubygems" | |
require "Plist" |
This file contains hidden or 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
- (void)liveRequest:(ASIHTTPRequest *)request didReceiveData:(NSData *)data { | |
NSString *aString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; | |
NSError *error = nil; | |
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"(\\{.*?\\})"options:NSRegularExpressionCaseInsensitive error:&error]; | |
[regex enumerateMatchesInString:aString options:0 range:NSMakeRange(0, [aString length]) usingBlock:^(NSTextCheckingResult *match, NSMatchingFlags flags, BOOL *stop){ | |
//DLog(@"Our Range %@", NSStringFromRange(match.range)); | |
//DLog(@"Text %@", [aString substringWithRange:match.range]); | |
[Parser parserWithResponse:[aString substringWithRange:match.range] delegate:self andRequest:request]; | |
}]; | |
} |
This file contains hidden or 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
# Source: http://twitter.com/rentzsch/status/11677309429874688 | |
curl -o ~/Library/Sounds/inception.mp3 http://inception.davepedu.com/inception.mp3 && defaults write com.apple.Xcode PBXBuildFailureSound ~/Library/Sounds/inception.mp3 |
This file contains hidden or 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
ldfsljksfdlkj |