The Imposter's Handbook
This a collection of interesting links found in The Imposter's Handbook by Rob Conery.
#!/bin/ruby --verion => 2.0.0-p353
In Ruby, self is a special variable that always references the current object.
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|
In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc
Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server
Use this link and get $10 free. Just select the $5 plan unless this a production app.
This gist is part of a blog post. Check it out at:
reduce method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
List is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it much simpler to think about both the old list and the new one, what they contain, and
|# total_time_availability = [['8:30', '9:00'],['9:00', '9:30'],['9:30', '10:00'],['10:00', '10:30'],['10:30', '11:00'],['11:00', '11:30'],['11:30', '12:00'],['1:00', '1:30'],['1:30', '2:00'],['2:00', '2:30'],['2:30', '3:00'],['3:00', '3:30'],['3:30', '4:00'],['4:00', '4:30'],['4:30', '5:00']]|
|time_array = [[8.5, 9.0], [9.0, 9.5], [9.5, 10.0], [10.0, 10.5], [10.5, 11.0], [11.0, 11.5], [11.5, 12.0], [13.0, 13.5], [13.5, 14.0], [14.0, 14.5], [14.5, 15.0], [15.0, 15.5], [15.5, 16.0], [16.0, 16.5], [16.5, 17.0]]|
|# time_array = |
|# (8.5..17).step(0.5).each do |time||
|# time_array << time|
|# time_slot = |
|# time_array.each_with_index do |x, i||
|# time_slot << [x, time_array[i+1]]|