Skip to content

Instantly share code, notes, and snippets.

Set your status

Furkan Mustafa furkanmustafa

Set your status
Block or report user

Report or block furkanmustafa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
furkanmustafa /
Created Jul 20, 2013
Shell script to be used in build phases in xCode, so it will inject git revision and stuff into bundle
BUILD_NUMBER=`git rev-parse --short HEAD`
git update-index -q --refresh
CHANGES=$(git diff-index --name-only HEAD --)
if [ ! -z "${CHANGES}" ]; then
if [ "${CONFIGURATION}" == "Debug" ]; then
git diff --color | tools/ --bg=dark > gitdiff.html
View UIImage+Retina4.h
// 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>
furkanmustafa / NSDate+Formatters.h
Last active Jun 13, 2017
a few NSDateFormatter helpers for Objective-C
View NSDate+Formatters.h
/* */
// DateFormat Reference :
#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;
furkanmustafa / NSString+FMAdditions.h
Created Nov 30, 2013
NSString Categories for localization, formatting, regex
View NSString+FMAdditions.h
// 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__]
furkanmustafa / NSString+FMNumberFormatter.m
Created Dec 18, 2013
NSString category for formatting numbers easily with optional NSNumberFormatter settings as block
View NSString+FMNumberFormatter.m
// use it. get rid of `autorelease` if using arc.
// .h file
@interface NSString (FMNumberFormatter)
+ (NSString *)stringByFormattingNumber:(NSNumber*)number
formatterSettings:(void(^)(NSNumberFormatter* formatter))settingsBlock;
furkanmustafa / collectionOrder.js
Last active Aug 29, 2015
Simple routines for ordering database data in javascript
View collectionOrder.js
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;
furkanmustafa / timezone_stack.php
Last active Aug 29, 2015
Easy push/pop default timezone stack for php
View timezone_stack.php
// Timezone Stack
class TimezoneStack {
public static $stack = [];
static function Init() {
self::$stack[] = @date_default_timezone_get();
furkanmustafa /
Created May 28, 2014
iwlist scan parser for python
#!/usr/bin/env python
# Based on
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')
furkanmustafa / .tmux.conf
Created Oct 11, 2014
Tmux configuration
View .tmux.conf
#### 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
furkanmustafa /
Last active May 1, 2019
Simple script to watch streaming videos with mpv and youtube-dl
#!/bin/sh -e
# Public domain
# Author: roman []
# Modified By: furkan [] 2014.10.19, added cache parameter and deleting cookie file
# Usage: ./me url [youtube-dl parameters]
You can’t perform that action at this time.