start new:
tmux
start new with session name:
tmux new -s myname
| RewriteEngine on | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| # not rewrite css, js and images | |
| RewriteCond %{REQUEST_URI} !\.(?:css|js|map|jpe?g|gif|png)$ [NC] | |
| RewriteRule ^(.*)$ /index.html?path=$1 [NC,L,QSA] |
| sudo vi /lib/systemd/system/varnish.service | |
| sudo systemctl daemon-reload | |
| sudo service varnish restart | |
| # The link below would be helpful | |
| # https://www.digitalocean.com/community/questions/configure-varnish-with-apache-on-ubuntu-14-04 |
| <select class="form-control" id="" name="state"> | |
| <option value="Abia State">Abia State</option> | |
| <option value="Adamawa State">Adamawa State</option> | |
| <option value="Anambra State">Anambra State</option> | |
| <option value="Akwa Ibom State">Akwa Ibom State</option> | |
| <option value="Bauchi State">Bauchi State</option> | |
| <option value="Bayelsa State">Bayelsa State</option> | |
| <option value="Benue State">Benue State</option> | |
| <option value="Borno State">Borno State</option> | |
| <option value="Cross River State">Cross River State</option> |
| var coinTypes = [25, 10, 5]; | |
| var coinNb = [8, 12, 20]; | |
| function computeChange(change,coinTypes, coinNb) { | |
| var rez = []; | |
| for (var i = 0; i < coinTypes.length; ++i) { | |
| if (coinTypes[i] === 0) continue; | |
| var coinsToGet = Math.floor(change / coinTypes[i]); | |
| if (coinsToGet > coinNb[i]) { | |
| coinsToGet = coinNb[i]; | |
| } |
| import { Injectable, EventEmitter } from '@angular/core' | |
| import { Subject } from 'rxjs/Subject' | |
| import { Donor } from './donor.interface' | |
| import * as socketIO from 'socket.io-client' | |
| import * as sailsIO from 'sails.io' | |
| const url = 'http://localhost:1337' |
| # location for config | |
| # /etc/apache2/conf-available/php5.6-fpm.conf" | |
| <IfModule mod_fastcgi.c> | |
| AddHandler php5.6-fcgi .php | |
| Action php5.6-fcgi /php5.6-fcgi | |
| Alias /php5.6-fcgi /usr/lib/cgi-bin/php5.6-fcgi | |
| FastCgiExternalServer /usr/lib/cgi-bin/php5.6-fcgi -socket /var/run/php/php5.6-fpm.sock -pass-header Authorization -idle-timeout 3600 | |
| <Directory /usr/lib/cgi-bin> | |
| Require all granted | |
| </Directory> |
| /** | |
| * Donor.js | |
| * | |
| * @description :: TODO: You might write a short summary of how this model works and what it represents here. | |
| * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models | |
| */ | |
| const shortid = require('shortid'); | |
| module.exports = { |
| for (var i = 1; i < 99999; i++) { | |
| window.clearInterval(i); | |
| window.clearTimeout(i); | |
| if(window.mozCancelAnimationFrame)window.mozCancelAnimationFrame(i); // Firefox | |
| } |
| export class Observable_ extends Observable { | |
| private _json: Object = {}; | |
| constructor(key: string, args: Object) { | |
| super(args); | |
| this._json = (args != null && typeof args === 'object') ? args : {};//initialize object | |
| } | |
| public set(name: string, value: any) { | |
| this._json[name] = value; |