Git commands

, 13/04/2018

Init empty repository git init Show git status ( current branch, files modified ) git status Add all files git add . Add selected files git add [filename.js] Commit changes git commit -m "initial commit" Get content from the distant ...

View more

Swipe and drag

, , 16/03/2018

This snippet was used for making a circle slideshow with a bubble following the circle path. Useful to make some swipe / drag animations indicator__wrapper.on('mousedown touchstart',function(event){ event.preventDefault(); $('#circleslider').on('mousemove touchmove',function(event){ event.preventDefault(); // get circle offset position and height / 2 var ...

View more

Essential Javascript Cheat Sheet

, 2/10/2017

Note : All the content here comes from this awesome article : https://www.codementor.io/johnnyb/javascript-cheatsheet-fb54lz08k This cheat sheet include a couple of browser features you can access with JavaScript on the client side and platform-agnostic features you can use either on the ...

View more

Grunt config

27/09/2017

Grunt is a JavaScript Task Runner that will help you to minify, compile, unit test or lint your code. Installation This will put the grunt command in your system path, allowing it to be run from any directory. npm install ...

View more

Bower config

27/09/2017

Bower is a package manager for the web that will help you to manage dependencies of your projects. Bower depends on Node.js and npm. Also make sure that git is installed as some bower packages require it to be fetched ...

View more

Javascript objects

, 25/09/2017

Real Life Objects, Properties, and Methods In real life, a car is an object. A car has properties like weight and color, and methods like car.start() and car.stop(). Objects are variables too. But objects can contain many values. This code ...

View more

Javascript Arrays

, 25/09/2017

JavaScript arrays are used to store multiple values in a single variable. var cars = ["Saab", "Volvo", "BMW"]; What is it ? An array is a special variable, which can hold more than one value at a time. If you ...

View more

Useful jQuery pattern

, 24/09/2017

jQuery lightweight plugin pattern /*! * jQuery lightweight plugin boilerplate * Original author: @ajpiano * Further changes, comments: @addyosmani * Licensed under the MIT license */ // the semi-colon before the function invocation is a safety // net against concatenated ...

View more