(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.
nginx/ | |
!nginx/.gitkeep | |
!nginx/logs/.gitkeep | |
src/ | |
tmp/ |
# Run me with: | |
# | |
# $ nginx -p /path/to/this/file/ -c nginx.conf | |
# | |
# All requests are then routed to authenticated user's index, so | |
# | |
# GET http://user:password@localhost/_search?q=* | |
# | |
# is rewritten to: | |
# |
(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.
application:open-your-keymap | |
application:open-your-stylesheet | |
autocomplete:attach | |
autoflow:reflow-paragraph | |
bookmarks:clear-bookmarks | |
bookmarks:jump-to-next-bookmark | |
bookmarks:jump-to-previous-bookmark | |
bookmarks:toggle-bookmark | |
bookmarks:view-all | |
check:correct-misspelling |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
#!/bin/bash | |
# From here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# Based on: https://github.com/saxenap/install-redis-amazon-linux-centos | |
# Thanks to https://raw.github.com/gist/2776679/b4f5f5ff85bddfa9e07664de4e8ccf0e115e7b83/install-redis.sh | |
# Uses redis-server init script from https://raw.github.com/saxenap/install-redis-amazon-linux-centos/master/redis-server | |
############################################### | |
# To use: | |
## wget https://raw.github.com/jorgerc/install-redis-amazon-linux-centos/master/redis-install-script.sh | |
## chmod 777 redis-install-script.sh | |
## ./redis-install-script.sh |
class @GoogleAnalytics | |
@load: -> | |
# Google Analytics depends on a global _gaq array. window is the global scope. | |
window._gaq = [] | |
window._gaq.push ["_setAccount", GoogleAnalytics.analyticsId()] | |
# Create a script element and insert it in the DOM | |
ga = document.createElement("script") | |
ga.type = "text/javascript" |
preload_app! | |
min_threads = Integer(ENV['MIN_THREADS'] || 0) | |
max_threads = Integer(ENV['MAX_THREADS'] || 5) | |
threads min_threads, max_threads | |
workers Integer(ENV['WORKER_COUNT'] || 3 ) | |
on_worker_boot do | |
ActiveSupport.on_load(:active_record) do |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
package str | |
func Reverse(input string) string { | |
return "" | |
} |