(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.
| cd $HOME | |
| ln -s `which php54` ~/bin/php | |
| export PATH=$HOME/bin:$PATH | |
| curl -sS https://getcomposer.org/installer | php54 | |
| echo -e "\n# Composer\nalias composer=\"php54 \$HOME/composer.phar\"" >> $HOME/.bash_profile | |
| source $HOME/.bash_profile |
| /* | |
| * Append this to the end of your application/config.php | |
| * @see http://stackoverflow.com/questions/3700626/namespace-in-php-codeigniter-framework#21858556 | |
| */ | |
| spl_autoload_extensions('.php'); // Only Autoload PHP Files | |
| spl_autoload_register(function($classname) { | |
| if (strpos($classname, '\\') !== false) { |
(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.
| cordova plugin add https://github.com/brodysoft/Cordova-SQLitePlugin.git |
| Using nginx version: nginx/1.6.2 and Laravel 5 | |
| In the controller: | |
| use Symfony\Component\HttpFoundation\StreamedResponse; | |
| - - - - - - Some method - - - - - - - - - | |
| $response = new StreamedResponse(); | |
| $response->headers->set('Content-Type', 'text/event-stream'); | |
| $response->headers->set('Cache-Control', 'no-cache'); | |
| $response->setCallback( | |
| function() { |
| #!/bin/sh | |
| # Config for SSL. | |
| echo "--- Making SSL Directory ---" | |
| mkdir /etc/nginx/ssl | |
| echo "--- Copying $i SSL crt and key ---" | |
| openssl req -nodes -new -x509 -keyout /etc/nginx/ssl/server.key -out /etc/nginx/ssl/server.crt -subj "/C=US/ST=NY/L=NYC/O=Dis/CN=www.example.com" | |
| echo "--- Turning SSL on in nginx.conf. ---" |
| #!/bin/bash | |
| # | |
| # Creates a signed and zipaligned APK from your Ionic project | |
| # | |
| # Place your keystore in the root of your project and name it <company>.keystore | |
| # Use this script as following : | |
| # $ ./release.sh [company] [version] | |
| # | |
| # Don't forget to gitignore your key and your compiled apks. | |
| # |
| #!/bin/bash | |
| # STATUS A/O 2016 02 14: tested, works | |
| # based on https://barclaysapps.wordpress.com/2014/07/06/openalpr-install-for-rpi-and-udoo-and-tre-and-yun/ , | |
| # http://lukagabric.com/raspberry-pi-license-plate-recognition/, and updated for new packages. | |
| # there are other random notes and googled pages that also informed this tutorial whihc may not be specifically referenced. | |
| #This is not optimized for space or whatever, but does work. well, not as of 2016 01 03 but working to fix that) | |
| # discussion is at https://groups.google.com/forum/#!topic/openalpr/-vckIsPe618: please contribute if you can, and ask questions if you # # have them | |
| # thanks to Timis for tips and hints... |
| Vue.component('child', { | |
| ready(){ | |
| // send flash message | |
| this.$root.$broadcast('flashMessage',{ | |
| text: 'Better check yourself, you\'re not looking too good.', | |
| type: 'warning',//optional | |
| important: false,//optional | |
| timeout: 5000//optional | |
| }); |
| import cheerio from 'cheerio-without-node-native'; | |
| const convertRequestBodyToFormUrlEncoded = (data) => { | |
| const bodyKeys = Object.keys(data); | |
| const str = []; | |
| for (let i = 0; i < bodyKeys.length; i += 1) { | |
| const thisKey = bodyKeys[i]; | |
| const thisValue = data[thisKey]; | |
| str.push(`${encodeURIComponent(thisKey)}=${encodeURIComponent(thisValue)}`); |