Skip to content

Instantly share code, notes, and snippets.

Avatar

Alessandro Falchi afalchi82

View GitHub Profile
View readme.md
st=>start: Start
e=>end: End
op=>operation: My Operation
op2=>operation: lalala
cond=>condition: Yes or No?

st->op->op2->cond
cond(yes)->e
cond(no)->op2
@afalchi82
afalchi82 / gulpfile.js
Created Jan 15, 2018
Gulpfile for static Bootstrap website
View gulpfile.js
/* ----------------------------------------------------
Common commands
gulp dev
gulp custom-bootstrap
gulp copy-vendors
---------------------------------------------------- */
@afalchi82
afalchi82 / addFlexSliderSlide.js
Created Sep 23, 2015
Add slide to FlexSlider 2
View addFlexSliderSlide.js
var s = $('.flexslider'),
// Clone another slide markup
newSlide = s.find('li').eq(0).clone()
// Change image source
.find('img').attr('src', 'http://www.awwwards.com/awards/submissions/2015/09/5601375a79570.jpeg')
// Return parent element
.end();
@afalchi82
afalchi82 / DieHelvetica.js
Last active Sep 21, 2015
Kill Helvetica Neue
View DieHelvetica.js
var fucker = 'helvetica neue',
allElementsArr = document.querySelectorAll('*');
for( var i=0; i < allElementsArr.length; i++ ) {
var element = allElementsArr[i],
fontStack = getComputedStyle(element)['font-family'].toLowerCase();
if( fontStack.indexOf(fucker) !== -1 ) {
var newStack = fontStack.replace(fucker, 'fuck');
@afalchi82
afalchi82 / angular.js
Created Sep 10, 2015
Notes about common AngularJS elements
View angular.js
/* -------------------------------------------
Service
--------------------------------------------*/
// Definizione
module.service('myService', function() {
this.browsers = ['Firefox', 'Chrome', 'Internet Explorer'];
});
// Implementazione
@afalchi82
afalchi82 / git.txt
Last active Sep 11, 2015
Git common operations summary
View git.txt
# Set your user name and email address
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
# Checking Your Settings
$ git config --list
# Clones a repository to your computer
# To grab a complete copy of another user's repository, use git clone like this: