Man-pages translation (Korean) http://www.joinc.co.kr/modules/moniwiki/wiki.php/man/
Linux Container http://lxc.sourceforge.net/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #http://ruby-hacking-guide.github.io/minimum.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -hashbangs: | |
| shell annotation that defines what to excute or compile, located at top. | |
| example: #!/bin/bash | |
| -Shell builtin commands. ($ man builtin) | |
| - do done loop | |
| do | |
| case $opt in | |
| "opt 1" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*#Regexp syntax: | |
| / match / options / | |
| ^ ^ | |
| start of match: ^ | |
| end of match: $ | |
| wrap: ( ) | |
| range: [0-9] = \d | |
| [01] = 0 or 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //using String.split to split and assign Object | |
| function splitCurrentURL(){ | |
| //query given index.html?this=true&that=good; | |
| var url = location.href.split("?")[1]; // this=true&that=good; | |
| params = {}; //init param obj | |
| url = url.split("&"); // ['this=true','that=good'] | |
| for(var i = 0; i<url.length; i++){ | |
| var split_cache = url[i].split("="); // ['this','true'], ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function reverseString(string){ | |
| var length = string.length; | |
| var output = ''; | |
| for(var i=1;i<=length;i++){ | |
| output = output.concat(string[length-i]); | |
| console.dir(output) | |
| } | |
| return output; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function add(a,b){ return a + b;} | |
| add(1) //returns NaN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //extract substring from a string. | |
| String.prototype.substring([starting index], [end index]) | |
| //strip string before the index | |
| String.prototype.substring([index]) | |
| //get index of string, if search doesn't exist in string then return -1 | |
| String.prototype.indexOf([search]) | |
Popular Structures
List
Linked List: Linked list is a dynamic data structure whose length can be increased or decreased at run time.
How Linked lists are different from arrays? Consider the following points :
An array is a static data structure. This means the length of array cannot be altered at run time. While, a linked list is a dynamic data structure. In an array, all the elements are kept at consecutive memory locations while in a linked list the elements (or nodes) may be kept at any location but still connected to each other.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //convert array-like object into array: | |
| //ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions_and_function_scope/arguments | |
| //local variable 'arguments' can be converted into array using Array.prototype.slice.call(arguments) | |
| function getArrayofArgs(){ | |
| var args = Array.prototype.slice.call(arguments) | |
| return args; | |
| } |