Skip to content

Instantly share code, notes, and snippets.

Gabriele Marazzi gabrielem

Block or report user

Report or block gabrielem

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View __
//add.test.js
test('two plus two is four', () => {
expect(2 + 2).toBe(4)
})
//canary.test.js
describe('canary', function () {
it('can run a test', function () {
expect(true).toBe(true)
})
View __KB.md

Keybase proof

I hereby claim:

  • I am gabrielem on github.
  • I am g4nd4l7 (https://keybase.io/g4nd4l7) on keybase.
  • I have a public key ASDrHzsnFZ07B7yxpRAlry0po-ipWYzh_k7IDfdHPX70Ago

To claim this, I am signing this object:

View simpleVanillaTODO
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>My TODO List</title>
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<style media="screen">
@gabrielem
gabrielem / truffle_angular_postpone_bootstrap.md
Created Dec 2, 2016 — forked from mpolci/truffle_angular_postpone_bootstrap.md
Postponed AngularJS bootstrap for Truffle since version 2.0.8
View truffle_angular_postpone_bootstrap.md

Truffle since release 2.0.8 delays the initialization of the global variable web3 after the load event, so this variable is not available during angular bootstrap, inside a .config() section, inside providers and neither inside the controllers initialized at load time and related injected services.

Accessing to the web3 variable inside a setTimeout() call could be a solution for simple projects but the only way to be sure that web3 is initialized is to postpone the angular bootstrap.

Looks at the code below:

@gabrielem
gabrielem / projects.html
Last active Nov 20, 2016
xbtfreelancer.com/projects
View projects.html
<!DOCTYPE html>
<!--[if IE 8]><html class="ie8 no-js" lang="en"><![endif]-->
<!--[if IE 9]><html class="ie9 no-js" lang="en"><![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- start: HEAD -->
<head>
<title>Browse Projects paid for in bitcoin - Work for bitcoin doing Jobs & Projects</title>
@gabrielem
gabrielem / gist:5c3a543e1f0999e33b2242ee6643fcb3
Created Sep 17, 2016
FlattenArray - For careers.citrusbyte.com
View gist:5c3a543e1f0999e33b2242ee6643fcb3
function flatten(arr) {
const flat = [].concat(...arr)
return flat.some(Array.isArray) ? flatten(flat) : flat;
}
/*
Usage:
*/
flatten([[1,2,[3]],4])
/*
@gabrielem
gabrielem / class-milo-shortcodes.php
Created Mar 12, 2016
milo-shortcodes/includes/class-milo-shortcodes.php
View class-milo-shortcodes.php
<?php
/**
* The file that defines the core plugin class
*
* A class definition that includes attributes and functions used across both the
* public-facing side of the site and the admin area.
*
* @link http://www.europadns.com/
* @since 1.0.0
@gabrielem
gabrielem / Codice modificato
Created Aug 31, 2015
Aggiorna il tuo config.yml che si trova in /EMLcms/app/config/config.yml
View Codice modificato
# Twig Configuration
twig:
debug: "%kernel.debug%"
strict_variables: "%kernel.debug%"
globals:
web_path: %web_path%
Globalizer: "@Globalizer"
@gabrielem
gabrielem / Tool 1
Created Mar 27, 2015
BookMark per Responsive Tools
View Tool 1
javascript:void((function(){var d=document;d.write('<!DOCTYPE html><html><head><meta charset="UTF-8"><title>'+d.title+' - Responsive test</title><link rel="stylesheet" href="http://responsive.victorcoulon.fr/assets/css/app.css"><script src="http://responsive.victorcoulon.fr/assets/js/app.min.js"></script></head><body><header><div class="close"><a href="#">%C3%97</a></div><div id="size"></div><div class="keyboard"><a href="#">I</a></div><div class="cssrefresh"><a href="#">I</a></div><div id="devices"><a href="#" class="tablet-portrait"><span>Tablet Portrait</span></a><a href="#" class="tablet-landscape"><span>Tablet Landscape</span></a><a href="#" class="smartphone-landscape"><span>iPhone Landscape</span></a><a href="#" class="smartphone-portrait"><span>iPhone Portrait</span></a><a href="#" class="auto active"><span>Auto</span></a></div></header><section><div id="wrapper"><iframe src="'+d.URL+'" onLoad="resbook.changeUrl(this.contentWindow.location,this.contentDocument.title);"></iframe><span class="keyboard-b
View WebSql index.js
<!DOCTYPE html>
<!--
Copyright (c) 2012-2014 Adobe Systems Incorporated. All rights reserved.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
You can’t perform that action at this time.