A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()):
- Headers
- Links
- Bold
| [url "https://github.com/"] | |
| insteadOf = "gh:" |
| // check that popover won't try to move off-screen; dismiss if so | |
| // | |
| CGFloat pX = newAttachPoint.x; | |
| CGFloat pY = newAttachPoint.y; | |
| CGFloat pWidth = balloon.popoverContentSize.width; | |
| CGFloat pHeight = balloon.popoverContentSize.height; | |
| CGFloat mWidth = map.bounds.size.width; | |
| CGFloat mHeight = map.bounds.size.height; | |
| UIPopoverArrowDirection d = balloon.popoverArrowDirection; |
| If you use this code it would be great to receive a credit and link back in your app! Thanks. | |
| -Niels Gabel | |
| PlacePop Inc | |
| http://placepop.com | |
| http://nielsbot.com |
| #!/usr/bin/env python | |
| #--------- | |
| # Script to change the prefix of a framework | |
| #--------- | |
| import os | |
| import re | |
| import string |
| #!/bin/bash | |
| # | |
| # Throw this in your crontab. | |
| # | |
| # https://twitter.com/#!/manton/status/111893189971017729 | |
| # | |
| BOSS=boss@example.org | |
| CPU_THRESHOLD=1500 |
| #include "objc_id.hpp" | |
| int main(int argc, const char * argv[]) | |
| { | |
| @autoreleasepool { | |
| NSString *s1 = @"hello"; | |
| NSString *s2 = [@"hell" stringByAppendingString: @"o"]; | |
| if ((objc_id(s1) == objc_id(s2))) { | |
| NSLog(@"win"); |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| #import <Foundation/Foundation.h> | |
| // clang -g -Wall -framework Foundation -o bool bool.m | |
| // Are these two integers different? YES if so, NO if not | |
| // (even though it says YES and NO, it LIES! Can actualy return a range | |
| // of non-YES values) | |
| static BOOL different (int thing1, int thing2) { |
A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()):