Skip to content

Instantly share code, notes, and snippets.

View gsimone's full-sized avatar
🏠
Working from home

Gianmarco gsimone

🏠
Working from home
View GitHub Profile
const NUMERO_DI_PROSSIMI_PROGRAMMI = 3
const weekDaysString = [
'Lunedì',
'Martedì',
'Mercoledì',
'Giovedì',
'Venerdì',
'Sabato',
'Domenica',
@gsimone
gsimone / functions.php - custom-gallery
Last active June 1, 2017 11:23
Wordpress Custom Gallery Shortcode
options = {
// class for the scripts to be loaded on demand
scriptsClass: 'ce-elm',
// custom HTML for the banner
bannerHTML: '<a href="#" class="ce-trigger">Enable</a>',
// banner classes
bannerClasses: {
@gsimone
gsimone / Wikipedia Random Article
Last active February 1, 2021 10:21
Url for a random article in JSON format from wikipedia
http://en.wikipedia.org/w/api.php?action=query&generator=random&grnnamespace=0&prop=extracts&exchars=500&format=json
http://en.wikipedia.org/w/api.php?
action=query &
generator=random &
grnnamespace=0 &
prop=extracts &
exchars=500 & // must be > 0
format=json
@gsimone
gsimone / new_gist_file.js
Created January 9, 2014 11:19
arguments to array
var argArray = Array.prototype.slice.call(arguments);
<!-- nel document ready js -->
$('#servizio').on('click', function(){
$('#servizi').animatescroll({
onScrollStart: function(){ console.log('starting') },
onScrollEnd: function(){
$('#responsivedesign').addClass('animated flash')
}
})
})
function l(){
var toL = '', a = arguments, i = 0, output = '';
for (i in a){
if(typeof a[i] == 'object' && Object.prototype.toString.call( a[i] ) !== '[object Array]'){
for(property in a[i]){
toL += property + ': ' +a[i][property]+'; ';
}
} else {
toL =toL + ' ' + a[i] ;
}