Skip to content

Instantly share code, notes, and snippets.

View kuntau's full-sized avatar
💭
I may be slow to respond.

Nizamuddin Sulieman kuntau

💭
I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kuntau on github.
  • I am kuntau (https://keybase.io/kuntau) on keybase.
  • I have a public key ASB3kc-9o1lh1sXHVKgG9ODzw-N3HfrwQB_r7W-T-dA0Uwo

To claim this, I am signing this object:

/*
On Tue, Sep 30, 2008 at 6:52 AM, Austin English <austinenglish at gmail.com> wrote:
> On Mon, Sep 29, 2008 at 3:39 PM, Mark Wagner <carnildo at gmail.com> wrote:
>> What's the best way for an application to detect that it's running under Wine?
>>
>> As part of the installation process, under Windows our program does a
>> full-disk search of all local hard drives, but ignoring network drives
>> and removable media. Under Wine, this doesn't work too well, as
>> there's not a one-to-one mapping between disks and drive letters, and
>> there's usually at least one way to access the entire *nix filesystem.
@kuntau
kuntau / set_permission.sh
Created October 14, 2013 08:50
How to set chmod for a folder and all of its subfolders and files in Linux Ubuntu Terminal?
# The other answers are correct, in that chmod -R 755 will set this as permissions to all files and folders in the tree. But why on earth would you want to? It might make sense for the directories, but why set the execute bit on all the files?
# I suspect what you really want to do is set the directories to 755 and either leave the files alone or set them to 644. For this, you can use the find command. For example:
# To change all the directories to 755 (-rwxr-xr-x):
find /opt/lampp/htdocs -type d -exec chmod 755 {} \;
# To change all the files to 644 (-rw-r--r--):
@kuntau
kuntau / 0_reuse_code.js
Created October 12, 2013 00:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// Scraping Made Easy with jQuery and SelectorGadget
// (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga)
// by David Trejo
//
// Install node.js and npm:
// http://joyeur.com/2010/12/10/installing-node-and-npm/
// Then run
// npm install jsdom jquery http-agent
// node numresults.js
//
app = angular.module("MyApp")
app.controller 'TodoCtrl', ($scope) ->
$scope.todos = [{text: 'learn angular', done: true},
{text: 'learn coffeescript', done: false}]
$scope.addTodo = ->
@kuntau
kuntau / Default (Linux).sublime-keymap
Created August 11, 2013 01:41
My sublime text 3 keybinding
[
{
"keys": ["j", "j"], "command": "set_action",
"args": {"action": "vi_esc"},
"context":
[
{"key": "vi_mode_insert"},
{"key": "vi_is_buffer"}
]
},
@kuntau
kuntau / node.coffee
Last active December 15, 2015 20:09 — forked from shripadk/gist:652819
nodejs express couchdb redis
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'
@kuntau
kuntau / sublime_shortcut.textile
Last active December 15, 2015 19:09
a collections of sublime text shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@kuntau
kuntau / .vimrc
Last active December 15, 2015 02:59
set encoding=utf-8
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
Bundle 'gmarik/vundle'