This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var path = require("path"); | |
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var notify = require("gulp-notify"); | |
var source = require('vinyl-source-stream'); | |
var browserSync = require('browser-sync'); | |
var changed = require('gulp-changed'); | |
var gulp = require('gulp'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Emmanuel VAÏSSE <[email protected]> | |
* @see https://gist.github.com/evaisse/2c9feac19496928ad1fd62459cff8122 | |
* | |
* An Angular-seed (https://github.com/angular/angular-seed) tailored gulpfile, provide : | |
* | |
* - ng-annotate, prevengt loosing angular injection $annotation syntax against minification | |
* - angular template pre-compile | |
* - html/css/js minification | |
* - sourcemaps for css & js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* User: evaisse | |
* Date: 28/09/2016 | |
* Time: 12:45 | |
*/ | |
/** | |
* @see https://dev.kafol.net/2008/09/php-xml-generator.html | |
* Usage : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
*/ | |
var fs = require('fs'); | |
var results = {}; | |
var frameworks = [ | |
"vanillajs", | |
// "ractive", | |
// "vue", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ | |
# https://www.howtoforge.com/tutorial/install-mongodb-on-ubuntu-14.04/ | |
# https://www.nonamehosts.com/blog/how-to-install-and-configure-mongodb-on-ubuntu-14-04-x64/ | |
apt-get -y update | |
apt-get -y install curl fail2ban build-essential unzip whois zsh moreutils host gcc git libmcrypt4 libpcre3-dev g++ make make python-pip supervisor ufw unattended-upgrades default-mta | |
apt-get -y upgrade | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NPS_VERSION=1.10.33.6 | |
NGINX_VERSION=1.9.12 | |
# update | |
sudo apt-get update | |
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip git | |
# Next, we have to satisfy all the dependencies needed to run Nginx. For this purpose run the command: | |
sudo apt-get build-dep nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Use PHP >= 5.3, replace any chars that don't seems relevant | |
*/ | |
strtoupper(sprintf("%.8s-%.4s-4%.3s-A%.3s-%.12s", | |
md5(uniqid()), | |
md5(gethostname()), | |
md5(getmypid()), | |
md5(php_sapi_name()), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# lockfile for script | |
LOCKFILE=/var/lock/poll2build.pid | |
# check lock file | |
[ -f $LOCKFILE ] && echo "script already running @ `cat /var/lock/poll2build.pid`" && exit 0; | |
# trap for cleanup lock file | |
trap "{ rm -f $LOCKFILE; exit 255; }" EXIT INT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function will_fatal() | |
{ | |
a(); | |
} | |
function a() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simply encode a base js object as {a:2, d:[1,"two"], c: {foo: {bar:1}}} | |
* And returns URL encoded string : a=2&d[0]=1&d[1]=two&c[foo][bar]=1" | |
* | |
* @param {Object} object A base javascript object : {} | |
* @param {String} base Optionnal base notation, should only be used by recursion for internal work | |
* @return {String} URL encoded query string | |
*/ | |
Object.toQueryString = function (object, base) { | |
var queryString = []; |