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 | |
BUILD_NUMBER=`git rev-parse --short HEAD` | |
git update-index -q --refresh | |
CHANGES=$(git diff-index --name-only HEAD --) | |
if [ ! -z "${CHANGES}" ]; then | |
BUILD_NUMBER="${BUILD_NUMBER}+" | |
if [ "${CONFIGURATION}" == "Debug" ]; then | |
git diff --color | tools/ansi2html.sh --bg=dark > gitdiff.html | |
cp ${PROJECT_DIR}/gitdiff.html ${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH} | |
fi |
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
// | |
// UIImage+Retina4.h | |
// StunOMatic | |
// | |
// Created by Benjamin Stahlhood on 9/12/12. | |
// Copyright (c) 2012 DS Media Labs. All rights reserved. | |
// | |
#import <UIKit/UIKit.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
/* f@s2n.io */ | |
// DateFormat Reference : http://www.unicode.org/reports/tr35/tr35-25.html#Date_Format_Patterns | |
#import <Foundation/Foundation.h> | |
extern NSString* const DATEFORMAT_RFC3339; | |
@interface NSDate (FMDateFormatters) | |
+ (NSDate*)dateWithString:(NSString*)dateString format:(NSString*)format locale:(NSLocale*)locale timezone:(NSTimeZone*)zone; |
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+FMAdditions.h | |
// Use it. maybe keep a link to the author or sth. | |
// | |
#import <Foundation/Foundation.h> | |
// StringWithFormat Shorthand | |
#define f(format, ...) [NSString stringWithFormat:(format), ##__VA_ARGS__] |
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
// use it. get rid of `autorelease` if using arc. | |
// | |
// .h file | |
@interface NSString (FMNumberFormatter) | |
+ (NSString *)stringByFormattingNumber:(NSNumber*)number | |
formatterSettings:(void(^)(NSNumberFormatter* formatter))settingsBlock; | |
@end |
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
var collectionOrder = function(options) { | |
this.itemCount = options.itemCount; | |
this.move = options.move; | |
this.fetch = options.fetch; | |
if (typeof options.batchMove !== "undefined") { | |
this.batchMove = options.batchMove; | |
} else { | |
this.batchMove = this._batchMoveInternal; | |
} | |
}; |
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
<?php | |
// Timezone Stack https://gist.github.com/furkanmustafa/8710c43ba8299ca10a32 | |
class TimezoneStack { | |
public static $stack = []; | |
static function Init() { | |
self::$stack[] = @date_default_timezone_get(); | |
} |
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 python | |
# Based on http://ubuntuforums.org/showthread.php?t=984492&p=6193749#post6193749 | |
import subprocess | |
import re | |
proc = subprocess.Popen('iwlist scan 2>/dev/null', shell=True, stdout=subprocess.PIPE, ) | |
stdout_str = proc.communicate()[0] | |
stdout_list = stdout_str.split('\n') |
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
#### COLOUR (Solarized 256) | |
# default statusbar colors | |
set-option -g status-bg colour235 #base02 | |
set-option -g status-fg colour136 #yellow | |
set-option -g status-attr default | |
# default window title colors | |
set-window-option -g window-status-fg colour244 #base0 | |
set-window-option -g window-status-bg default |
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 -e | |
# | |
# Public domain | |
# Author: roman [] tsisyk.com | |
# Modified By: furkan [] s2n.io 2014.10.19, added cache parameter and deleting cookie file | |
# | |
# Usage: ./me url [youtube-dl parameters] | |
# | |
TMPDIR=/tmp |