I hereby claim:
- I am mchaisse on github.
- I am mchaisse (https://keybase.io/mchaisse) on keybase.
- I have a public key ASDUHILPSzGYvGEtUDx8Gpg5zkkUacf-FEgoXBNsKHSt8go
To claim this, I am signing this object:
| <?php | |
| $msg = 'Test'; | |
| parse_str($_SERVER['QUERY_STRING'], $output); | |
| if ($output['token'] != 'TOKEN') { | |
| exit(); | |
| } | |
| $msg = $output['message']; |
I hereby claim:
To claim this, I am signing this object:
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config to:
When using react-rails for an internationalized app it makes a lot of sense to use i18n-js for translations, so that you can reuse the the strings from your rails app's .yml files (and all the tooling & services that exist around that).
When you use the prerender feature of react-rails you face 2 problems:
translation.js & i18n.js from i18n-js need to be loaded inside the server-side JS prerendering processes, which is achieved by loading them inside the components.js.locale of each HTTP request. This is done by adding a custom renderer and using the before_render hook to configure i18n-js accordingly for each render call.| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| require 'progress_bar' | |
| namespace :resque do | |
| namespace :clear do | |
| desc 'Clear empty workers' | |
| task :empty_workers => :environment do | |
| workers = Resque.workers | |
| bar = ProgressBar.new(workers.size) |
| # see http://stackoverflow.com/questions/5880962/how-to-destroy-jobs-enqueued-by-resque-workers - old version | |
| # see https://github.com/defunkt/resque/issues/49 | |
| # see http://redis.io/commands - new commands | |
| namespace :resque do | |
| desc "Clear pending tasks" | |
| task :clear => :environment do | |
| queues = Resque.queues | |
| queues.each do |queue_name| | |
| puts "Clearing #{queue_name}..." |