Skip to content

Instantly share code, notes, and snippets.

🐝
Tinkering with @betagouv

Raphaël Huchet rap2hpoutre

🐝
Tinkering with @betagouv
Block or report user

Report or block rap2hpoutre

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:54503147e8bbd1abfa6d
// Add this in boot method of EventServiceProvider
if (!\App::runningInConsole()) {
\DB::listen(
function ($sql, $bindings, $time) {
\Log::info('QUERY', [$sql, $bindings, $time]);
}
);
}
View gitup.sh
git config --global alias.up '!git fetch && git rebase --autostash FETCH_HEAD'
@rap2hpoutre
rap2hpoutre / script.sh
Created Jan 4, 2017
music to video (ffmpeg command for youtube)
View script.sh
ffmpeg -loop 1 -i img.png -i music.mp3 -shortest -c:v libx264 -c:a copy video.mkv
@rap2hpoutre
rap2hpoutre / v0.sh
Last active Apr 26, 2017
Run this command in your "node_modules" directory
View v0.sh
npm list | grep "@0" | wc -l | awk '{print($1" v0 modules found. According to semver, anything may change at any time (http://semver.org/\#spec-item-4)")}'
View webpack.mix.js
// ...
let webpack = require("webpack");
mix.webpackConfig({
plugins: [
// Choose the language you want to keep (Ex: "fr")
new webpack.ContextReplacementPlugin(/moment[\/\\]locale$/, /fr/)
]
});
@rap2hpoutre
rap2hpoutre / guzzle.php
Last active Jun 21, 2017
One line guzzle for json rest api
View guzzle.php
<?php
$a = json_decode((new GuzzleHttp\Client())->get('https://api.github.com/user')->getBody(), true);
@rap2hpoutre
rap2hpoutre / example
Last active Aug 30, 2017
Procedural drum loops
View example
kicks = "D:/Sound/procedural/kicks"
snares = "D:/Sound/procedural/snares"
hh = "D:/Sound/procedural/hats/"
ohh = "D:/Sound/procedural/ohats/"
rides = "D:/Sound/procedural/rides/"
crashes = "D:/Sound/procedural/crashes/"
use_random_seed 401492
define :crash do
@rap2hpoutre
rap2hpoutre / circle.yml
Created May 19, 2016
Circle CI example for Laravel
View circle.yml
machine:
timezone:
Europe/Paris
php:
version: 7.0.3
environment:
ENVIRONMENT: testing
DB_URL: 127.0.0.1
@rap2hpoutre
rap2hpoutre / gup-to-webpack.md
Last active Jan 30, 2019
Laravel 5.4: migrate from gulp to webpack
View gup-to-webpack.md
  • Create a webpack.mix.js file in root directory:
const { mix } = require('laravel-mix');

mix.js('resources/assets/js/app.js', 'public/js')
  .sass('resources/assets/sass/app.scss', 'public/css');
  
/* Optional: uncomment for bootstrap fonts */
// mix.copy('node_modules/bootstrap-sass/assets/fonts/bootstrap/','public/fonts/bootstrap');
@rap2hpoutre
rap2hpoutre / laravel-forge-deploy.sh
Last active Jul 26, 2019
Laravel Forge deploy script without downtime
View laravel-forge-deploy.sh
# stop script on error signal
set -e
# remove old deployment folders
if [ -d "/home/forge/deploy" ]; then
rm -R /home/forge/deploy
fi
if [ -d "/home/forge/backup" ]; then
rm -R /home/forge/backup
fi
You can’t perform that action at this time.