- Create or find a gist that you own.
- Clone your gist (replace
<hash>
with your gist's hash):# with ssh git clone [email protected]:<hash>.git mygist # with https
git clone https://gist.github.com/.git mygist
<hash>
with your gist's hash):
# with ssh
git clone [email protected]:<hash>.git mygist
# with https
git clone https://gist.github.com/.git mygist
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
Rich Hickey • 3 years ago
Sorry, I have to disagree with the entire premise here.
A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.
Mastery comes from a combination of at least several of the following:
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
exports.db = function(fn){ | |
MongoClient.connect(mongoUrl, function(err, db) { | |
if(err){throw err;} | |
global.nss = {}; | |
global.nss.db = db; | |
global.nss.db.collection('listings').ensureIndex({'coordinates':'2dsphere'}, function(err, indexName){ | |
console.log('Connected to MongoDB'); | |
fn(); | |
}); | |
}); |
function initMap(lat, lng, zoom){ | |
var mapOptions = {center: new google.maps.LatLng(lat, lng), zoom: zoom, mapTypeId: google.maps.MapTypeId.ROADMAP}; | |
map = new google.maps.Map(document.getElementById('map'), mapOptions); | |
} | |
function addMarker(location){ | |
var position = new google.maps.LatLng(location.lat, location.lng); | |
var marker = new google.maps.Marker({map:map, position:position, title:location.address}); | |
markers.push(marker); | |
} |
9 var fs = require('fs'); | |
10 var request = require('request'); | |
11 var url = 'https://api:[email protected]/v2/YOURDOMAIN/messages'; | |
12 var post = request.post(url, function(err, response, body){ | |
13 res.send({}); | |
14 }); | |
15 var form = post.form(); | |
16 form.append('from', '[email protected]'); | |
17 form.append('to', '[email protected]'); | |
18 form.append('subject', 'hey from node.js'); |
app.use(express.cookieParser()); | |
app.use(express.session({ | |
store : new RedisStore({host: 'localhost', port: 6379}), | |
secret: 'change-this-to-a-super-secret-message', | |
cookie: { maxAge: 60 * 60 * 1000 } | |
})); | |