Skip to content

Instantly share code, notes, and snippets.

/*** ? Ternary ***/ 4-8-2015
condition ? true : false;
(a === b) ? alert("yes") : alert("nope")
/*** typeof ***/
***************
HTML
***************
<h1 id="message"> Log Output </h1>
<p id="log"> </p>
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.
Sublime Packages control
Download from https://packagecontrol.io/installation
Command shift p | Package Manage
Command p
Command K + b | Hide the dir bar
Command Shift D | Duplicate
@jjsub
jjsub / Bootstrap
Last active August 29, 2015 14:15
Lets get our hands dirty with Bootstrap!
1) Create a project folder with any name you wish.
2) Download bootstrap from www.getbootstrap.com or do a $ bower install bootstrap
3) Extract the - /css - /fonts - /js files in to your bootstrap demo.
Undo a commit and redo
$ git commit ... (1)
$ git reset --soft HEAD~1 (2)
$ edit (3)
$ git add .... (4)
$ git commit -c ORIG_HEAD (5)
1 This is what you want to undo
@jjsub
jjsub / gist:90eb57c9a3a15cf2e64d
Created November 19, 2014 21:26
AmCharts 101
Note: All the code is on a html file.
After download AmChart zip file from the website.
Follow the tutorial.
http://www.amcharts.com/tutorials/your-first-chart-with-amcharts/
<!DOCTYPE html>
@jjsub
jjsub / .jshintrc
Last active August 29, 2015 14:07 — forked from chyld/.jshintrc
{
"camelcase": true,
"curly": true,
"eqeqeq": true,
"forin": true,
"immed": true,
"indent": 2,
"latedef": "nofunc",
"newcap": true,
"noarg": true,