This file contains hidden or 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
NGINX=$(ps aux | grep -c nginx) | |
if [ $NGINX -eq 1 ] | |
then | |
echo 'stop apache, start nginx'; | |
sudo apachectl stop; sudo nginx; | |
else | |
echo 'stop nginx, start apache'; | |
sudo nginx -s stop; sudo apachectl start; | |
fi |
This file contains hidden or 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
'use strict'; | |
var $ = require('gulp-load-plugins')(); | |
var _ = require('lodash'); | |
var fs = require('node-fs-extra'); | |
var gulp = require('gulp'); | |
var handlebars = require('handlebars'); | |
var path = require('path'); | |
gulp.task('handlebars', () => { |
This file contains hidden or 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 gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
var concat = require('gulp-concat'); | |
var declare = require('gulp-declare'); | |
var rename = require('gulp-rename'); | |
var locales = ['nb_NO', 'nn_NO']; | |
locales.forEach(function(locale) { | |
gulp.task(locale, function() { |
This file contains hidden or 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 gulp = require('gulp'); | |
var concat = require('gulp-concat'); | |
var handlebars = require('gulp-handlebars'); | |
var wrap = require("gulp-wrap"); | |
gulp.task('partials', function() { | |
return gulp.src('templates/partials/*.html') | |
.pipe(handlebars()) | |
.pipe(wrap('Handlebars.registerPartial("<%= fname(file) %>", Handlebars.template(<%= contents %>))', { | |
}, { |
This file contains hidden or 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
if(!String.prototype.format) { | |
String.prototype.format = function() { | |
var cnt = 0; | |
var args = arguments; | |
return this.replace(/(\%s)/g, function(match) { | |
var term = typeof args[cnt] !== 'undefined' ? args[cnt] : match; | |
cnt++; | |
return term; | |
}); | |
}; |
This file contains hidden or 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
use strict; use warnings; | |
use HTML::Strip; | |
use Devel::Peek; | |
use Test::More tests => 3; | |
use Encode; | |
use utf8; | |
=head1 Workaround for HTML::Strip with utf8 |
This file contains hidden or 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 mustache = require('mustache'); | |
var onebox = require('onebox'); | |
// custom render method for preview | |
var preview = onebox({ | |
render: function(engine, data, cb) { | |
var tpath = path.join(__dirname, 'templates', engine+'.mustache'); | |
fs.readFile(tpath, function(err, buf) { |
- Performance improvements
- ActionCable websocket support
- merge request #420 by @hsluo
- Rails 5 requires Ruby 2.2.2 or newer. (2.2.4 or 2.3.0)
- reduce memory usage by taking advantage of GC
gem update --system