Skip to content

Instantly share code, notes, and snippets.

View muhammadghazali's full-sized avatar

Muhammad Ghazali muhammadghazali

View GitHub Profile
@muhammadghazali
muhammadghazali / about.md
Created August 13, 2011 10:48 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@muhammadghazali
muhammadghazali / nodejs_ubuntu_setup.sh
Created October 29, 2011 11:52
Node.js installation script for Ubuntu Linux. This installation script is already tried on my Ubuntu 11.04 Linux Box.
# The official wiki page for Building and Installing Node.js
# https://github.com/joyent/node/wiki/Installation
# Update the system
echo 'Update the system'
sudo apt-get -y udpate
echo 'System updated'
# Install the dependencies packages
echo 'Install the dependencies packages'
@muhammadghazali
muhammadghazali / installdotnavefor_blaastsdk.sh
Created October 29, 2011 12:44
Failed to start backend process because there is no such a directory of "/home/user/.nave/installed/0.4.7/bin/node"
# The discussion:
# http://devsupport.blaast.com/discussions/problems/48-failed-to-start-backend-process-because-there-is-no-such-a-direcotry-of-homeghazalinaveinstalled047binnode
# The error message:
# Failed to start backend process: Cannot run program "home/user/.nave/installed/0.4.7/bin/node": java.io.IOException: error=2, No such File or Directory.
# The work around works with these steps:
# I have to create a directory ".nave/installed" in my user home directory
cd ~
mkdir .nave/installed
$ git tag -a v1.0.0 -m "Creating the first official version."
$ git show v1.0.0
$ git describe --tags
# Made changes
$ touch test
# Added changes
@muhammadghazali
muhammadghazali / PostHtmlFormNetBeansCodeTemplate
Created December 25, 2011 19:21
Code Template for post HTML form in NetBeans
<form name="${name}" id="${id}" method="post" action="${action}" >
${cursor}
</form>
@muhammadghazali
muhammadghazali / GetHtmlFormNetBeansCodeTemplate
Created December 27, 2011 17:13
Code Template for get HTML form in NetBeans
<form name="${name}" id="${id}" method="get" action="${action}" >
${cursor}
</form>
@muhammadghazali
muhammadghazali / CodeTempalte-JavaScript-anofunc-with-name
Created February 7, 2012 21:02
JavaScript Code Template for anonymous function. I used this code template in NetBeans. Read more: http://wiki.netbeans.org/Java_EditorUsersGuide#How_to_use_Code_Templates
function ${name}(${parameters}) {${cursor}}
@muhammadghazali
muhammadghazali / CommonGitCommandAliases
Created March 21, 2012 15:48
git status, git add, git commit, and git checkout are such common commands that it is useful to have abbreviations for them. http://gitimmersion.com/lab_11.html
# GIT IMMERSION tutorial
# http://gitimmersion.com/lab_11.html
# Add the following to the .gitconfig file in your $HOME directory.
[alias]
co = checkout
ci = commit
st = status
br = branch
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
type = cat-file -t
@muhammadghazali
muhammadghazali / RenameTagInGitRepository
Created April 3, 2012 06:58
A steps of commands to rename a tag in git repository. Source: http://stackoverflow.com/a/5719854/1061371
# checkout the old tag
git checkout old
# create a new tag
git tag new
# delete the old tag on local git repository
git tag -d old
# delete the old tag on remote git repository
git push origin :refs/tags/old
@muhammadghazali
muhammadghazali / The-Ghanozs-Vows-test-suite-template.js
Last active October 3, 2015 04:58
Ghanoz's BDD test suite template in Vows - http://vowsjs.org
var vows = require('vows');
var assert = require('assert');
var testSuite = vows.describe('Scenario: Test Fake API Scenario');
testSuite.addBatch({
'GIVEN some context' : {
'WHEN I do something' : {
topic: function () { return something('value', this.callback); },
// then the do something should return anything