HTTP server which receives requests and dumps them to a flat file.
Start HTTP server:
$ nodejs ./httprequestdump.js
# Change to the project directory | |
cd $FORGE_SITE_PATH | |
# Turn on maintenance mode | |
php artisan down || true | |
# Pull the latest changes from the git repository | |
# git reset --hard | |
# git clean -df | |
git pull origin $FORGE_SITE_BRANCH |
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Console\Scheduling\Schedule; | |
class ScheduleList extends Command | |
{ | |
/** |
<?php | |
// Helper function. | |
if (! function_exists('timer')) { | |
function timer($expression) | |
{ | |
$start = microtime(true); | |
if ($expression instanceof Closure) { | |
$expression(); |
var elixir = require('laravel-elixir'); | |
var gutil = require('gulp-util'); | |
// If 'gulp watch' is run | |
if (gutil.env._.indexOf('watch') > -1) { | |
// Enable watchify for faster builds | |
elixir.config.js.browserify.watchify.enabled = true |
SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120) | |
FROM information_schema.processlist | |
WHERE command <> 'Sleep' | |
AND info NOT LIKE '%PROCESSLIST%' | |
ORDER BY time DESC LIMIT 50; |
November 29, 2011 developmentNginx
Few days ago I had to add a wordpress installation within the same environment where a Codeigniter app was already running happily and undisturbed.
It took me a while to figure out how to keep separate folders on the filesystem, and serve the blog from a subfolder of the main domain:
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.