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 /* | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. |
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 |
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
#!/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
<?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
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
// 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
// | |
// 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
/* 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
// | |
// 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> |