This file contains 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
Sublime Packages control | |
Download from https://packagecontrol.io/installation | |
This file contains 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
Put your cursor on the word wood and use * and # to move back and forth between the two matching words. | |
now let's find the word wood, but first let's move to the top of the file with gg. Then press G to move to the bottom. | |
when you're at the bottom of the file type /wood. This will find the first matching pattern. to cycle through all matches | |
you will use the n (next occurance) and N (previous occurance) keys. | |
next, you're going to start deleting some characters. go to the next line and put your cursor on top of the character that's out of place. | |
then press the x key to delete it. |
This file contains 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
*************** | |
HTML | |
*************** | |
<h1 id="message"> Log Output </h1> | |
<p id="log"> </p> | |
This file contains 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
/*** ? Ternary ***/ 4-8-2015 | |
condition ? true : false; | |
(a === b) ? alert("yes") : alert("nope") | |
/*** typeof ***/ |
This file contains 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
/*Simple recursive Factorial recursive function */ | |
function fact(n){if(n === 0){return 1;} else{ return n*fact(n-1);}} | |
or | |
function fu(n){ return (n == 1|| n == 0) ? 1 : n * fu(n-1); } | |
This file contains 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
/* Show the border of all the element */ | |
*{ | |
border: 1px solid red; | |
} | |
/* import font */ | |
@import url(http://fonts.googleapis.com/css?family=Noto+Sans); |
This file contains 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
txtblk='[\e[0;30m]' # Black | |
txtred='\[\e[0;31m\]' # Red | |
txtgrn='\[\e[0;32m\]' # Green | |
txtylw='\[\e[0;33m\]' # Yellow | |
txtblu='\[\e[0;34m\]' # Blue | |
txtpur='\[\e[0;35m\]' # Purple | |
txtcyn='\[\e[0;36m\]' # Cyan | |
txtwht='\[\e[0;37m\]' # White | |
txtrst='\[\e[0m\]' # Text Reset |
This file contains 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
Simple HTML | |
<!DOCTYPE html> | |
<html> | |
<body> | |
<h1>My First Heading</h1> | |
<p>My first paragraph.</p> |
This file contains 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
THE DIFFERENCE BETWEEN GIT PULL, GIT FETCH AND GIT CLONE (AND GIT REBASE) | |
Git Pull | |
From what I understand, git pull will pull down from a remote whatever you ask (so, whatever trunk you’re asking for) and instantly merge it into the branch you’re in when you make the request. Pull is a high-level request that runs ‘fetch’ then a ‘merge’ by default, or a rebase with ‘–rebase’. You could do without it, it’s just a convenience. | |
%> git checkout localBranch | |
%> git pull origin master | |
%> git branch |
This file contains 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
Simple collaborating git flow | |
Add collaborator on remote settings ( github ) | |
+ setting ( remote repo ) | |
+ Contributor clone rep down | |
Create branch and cd into it: |