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 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 / 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
furkanmustafa / .tmux.conf
Created Dec 14, 2016
Tmux Configuration
View .tmux.conf
set -g default-terminal "screen-256color"
#set -g history-limit 10000
#set -g mode-mouse on
#set -g terminal-overrides 'xterm*:smcup@:rmcup@'
#set -g mouse-select-pane on
#set -g mouse-select-window on
#set -g mouse-resize-pane on
bind -n WheelUpPane copy-mode
bind -n S-down new-window
furkanmustafa /
Last active Aug 3, 2016
A draft rancher management script using bash and jshon
#!/bin/sh -e
# set -x
PROJECT_ID="1a5" #id of my stack in rancher
furkanmustafa /
Created Apr 22, 2016
Quickly start an iso with qemu (kvm)
#!/bin/sh -e
exec qemu-system-x86_64 -enable-kvm -cdrom $1 -m 1024
furkanmustafa / async_controller.rb
Last active Feb 10, 2016
Sample Asynchronous action code for rails
View async_controller.rb
# FROM: @jbaudanza
# Modified to get it working.
module AsyncController
# This is the rack endpoint that will be invoked asyncronously. It will be
# wrapped in all the middleware that a normal Rails endpoint would have.
class RackEndpoint
attr_accessor :action
furkanmustafa /
Last active Nov 12, 2015
A simple script to play random mp3s in a folder
#!/bin/bash -e
PLAYER="mpv -vo null"
MUSIC=$(find . -regextype posix-extended -iregex '.*(m4a|mp3|mp4|aac)$' | sort -R)
for file in $MUSIC
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 / gitcommit.nanorc
Created Jul 28, 2015
Git Commit nanorc file with diff/patch support
View gitcommit.nanorc
# Some parts from here :
# Some parts from here :
# syntax highlighting for git commit messages
syntax "patch" ".git/COMMIT_EDITMSG$"
# overlong lines
# color brightred "^.{70,}.+$"
# comment
View better-pmset-values
DestroyFVKeyOnStandby 1
Active Profiles:
Battery Power -1*
AC Power -1
Currently in use:
standbydelay 0
standby 0
halfdim 1
hibernatefile /var/vm/sleepimage
darkwakes 0
You can’t perform that action at this time.