Skip to content

Instantly share code, notes, and snippets.

$ open -a TextEdit .bash_profile
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
@jjsub
jjsub / clojure.md
Last active August 29, 2015 14:21 — forked from rakhmad/clojure.md

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

Step 1: Getting Clojure (1.3)

<!-- Good JS simple try catch throw finally example-->
<!DOCTYPE html>
<html>
<body>
<p>Please input a number between 5 and 10:</p>
<input id="demo" type="text">
<button type="button" onclick="myFunction()">Test Input</button>
How to synchronize your github fork with "original" repository
Working with a fork repo pushing to your own Forked repo and keep up to date with the original repo without losing your work.
- First fork the repo ( remote/On-github)
$ git clone <dir_name>
- cd in to the dir
Simple collaborating git flow
Add collaborator on remote settings ( github )
+ setting ( remote repo )
+ Contributor clone rep down
Create branch and cd into it:
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
Simple HTML
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
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
@jjsub
jjsub / CSS
Last active August 29, 2015 14:18
/* Show the border of all the element */
*{
border: 1px solid red;
}
/* import font */
@import url(http://fonts.googleapis.com/css?family=Noto+Sans);
@jjsub
jjsub / Recursive
Last active August 29, 2015 14:18
/*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); }