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 / SimpleICS.php
Last active Aug 2, 2019
Simple ICS Generation class for PHP
View SimpleICS.php
<?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
GNU General Public License for more details.
furkanmustafa /
Last active Jun 2, 2019
Simple Bash Script to download files from your accountUsage: "https://put-io-download-link"
PUTIO_USERNAME="your username"
PUTIO_PASSWORD="your password"
wget --http-user=${PUTIO_USERNAME} --http-password=${PUTIO_PASSWORD} --content-disposition -c $@
furkanmustafa /
Created May 28, 2013
Objective-C Base Conversion
Original Code From, Md. Mahmud Ahsan,, 2008.02.28
Adapted Objective-C, Furkan Mustafa, 2013.05.28
Description: Alpha Numeric Base Conversion, Handles upto base 36
NSString* reverseString(NSString* original) {
const char* chars = [original cStringUsingEncoding:NSASCIIStringEncoding];
int length = strlen(chars);
char* new = (char*)malloc(length+1);
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]
View ghost-in-the-shell-ordered-list.txt
Ghost in the shell - Ordered list of Movie and Series
- Ghost in the Shell (1995/10)
- Ghost in the Shell 2: Innocence (2004/3)
- (Series) Ghost in the Shell: Stand Alone Complex (2002/10 .. 2003/10, 26 episodes)
furkanmustafa / html-php-date-picker.php
Created Jan 27, 2013
Date Picker Select Generator for HTML & PHP
View html-php-date-picker.php
<select name="year">
<option value="">Year</option>
<?php for ($year = date('Y'); $year > date('Y')-100; $year--) { ?>
<option value="<?php echo $year; ?>"><?php echo $year; ?></option>
<?php } ?>
<select name="month">
<option value="">Month</option>
<?php for ($month = 1; $month <= 12; $month++) { ?>
<option value="<?php echo strlen($month)==1 ? '0'.$month : $month; ?>"><?php echo strlen($month)==1 ? '0'.$month : $month; ?></option>
furkanmustafa / vmstat-parser.php
Created Feb 7, 2013
PHP Function for parsing vmstat output
View vmstat-parser.php
// $res[] = "procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----";
// $res[] = " r b swpd free buff cache si so bi bo in cs us sy id wa";
// $res[] = " 0 0 0 10376 148188 291056 0 0 4 29 85 9 1 0 98 1";
// // or
// // exec('vmstat', $res);
// print_r(parseVMStatOutput($res));
furkanmustafa /
Created Oct 10, 2017
Script to generate /lib/modules/`uname -r`/build directory
#!/bin/bash -e
# Extracted from:
set -x
ARCH=$(uname -m)
KARCH=x86 # applies to x86_64 too (change for arm, etc.)
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 / power-usage
Created Apr 21, 2017
Linux Battery and Power Usage Monitoring Script
View power-usage
#!/usr/bin/env python2
import os
def readfile(path):
f = open(path, 'r')
if not f:
return false
val =
return val
You can’t perform that action at this time.