Skip to content

Instantly share code, notes, and snippets.

View gianlucacandiotti's full-sized avatar

Gianluca Candiotti gianlucacandiotti

  • Wolt
  • Helsinki, Finland
View GitHub Profile
@gianlucacandiotti
gianlucacandiotti / npm essential packages
Last active December 20, 2015 01:37
Install common npm packages
npm install --save browserify watchify babelify babel-preset-es2015 babel-preset-react babel-plugin-transform-class-properties react react-dom uglify-js uglifyify
"preclean": "if [ ! -d build ]; then mkdir build build/css build/js; fi",
"clean": "rm -rf build/css build/js && mkdir build/css build/js",
@gianlucacandiotti
gianlucacandiotti / heroku conf
Created January 19, 2016 03:05
Configure an environment variable in Heroku
heroku config:set variable="value"
git ls-files --deleted -z | xargs -0 git rm
node_modules/forever/bin/forever stopall
@gianlucacandiotti
gianlucacandiotti / vertical alignment placeholders
Last active February 29, 2016 21:19
Scss placeholders for vertical alignment
%vertical-align {
position: relative;
top: 50%;
transform: translateY(-50%);
}
%absolute-vertical-align {
position: absolute;
top: 50%;
left: 50%;
@gianlucacandiotti
gianlucacandiotti / fetch remote branch
Created February 8, 2016 17:12
Fetch a remote branch with git
git fetch <remote> <rbranch>:<lbranch>
sudo kill `sudo lsof -t -i:9001`
npm i --save babel-plugin-transform-class-properties babel-polyfill babel-preset-es2015 babel-preset-react babel-register babelify browserify dotenv es6-promise forever koa koa-body koa-compress koa-helmet koa-nunjucks-render koa-router koa-static node-fetch node-sass parallelshell ramda react react-dom uglify-js uglifyify whatwg-fetch
npm i --save-dev browser-sync nodemon watchify
(function () {
var _log = console.log;
console.log = function () {
var args = Array.prototype.map.call(arguments, function (arg) {
return typeof arg.toJS === "function" ? arg.toJS() : arg;
});
return _log.apply(console, args);
};
})();