Skip to content

Instantly share code, notes, and snippets.

View Lucbug's full-sized avatar
🚀
On a mission

Lucas Bugnazet Lucbug

🚀
On a mission
View GitHub Profile
#!/bin/bash
# Uses Gource (http://gource.io) to generate a lossless PPM and a high quality MP4 visualizing the history of a Git repo.
# By Jayden Seric: https://gist.github.com/jaydenseric/df3263eb3c33856c11ce
# Install Gource and FFmpeg with Homebrew:
# brew install gource
# brew install ffmpeg
@Lucbug
Lucbug / gulpfile.js
Created April 11, 2018 20:47
Create an object containing argument values in Gulp
// fetch command line arguments
const arg = (argList => {
let arg = {}, a, opt, thisOpt, curOpt;
for (a = 0; a < argList.length; a++) {
thisOpt = argList[a].trim();
opt = thisOpt.replace(/^\-+/, '');
if (opt === thisOpt) {
@Lucbug
Lucbug / gulpfile.js
Created April 11, 2018 13:17
Gulp build option to build app with pre-defined configs without editing React's Config.js (from other Config-*.js files)
// VARS
var gulp = require('gulp'),
[...];
gulp.task('build', function(callback) {
runSequence('clean', ['sass', 'js', 'images', 'assets', 'fonts'], 'minify', callback);
});
@Lucbug
Lucbug / Interface.js
Last active April 10, 2018 20:42
[GS] [React] Parent component (Interface.js) sets defaults state and gets updated by child's props (Settings.js)
constructor () {
this.state = {
// Set default values
settings : {
fps: 40,
bitrate: 8
}
};
}