Skip to content

Instantly share code, notes, and snippets.

Marco Fugaro marcofugaro

Block or report user

Report or block marcofugaro

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
@marcofugaro
marcofugaro / autostart
Last active Nov 18, 2019
Raspberry PI 4 fullscreen mode script, put this in `~/.config/lxsession/LXDE-pi/autostart`
View autostart
# Disable screensaver and blank screens
@xset s off
@xset -dpms
@xset s noblank
@xscreensaver -no-splash
# Hide mouse, must have installed unclutter with `sudo apt-get install unclutter`
@unclutter
# Load chromium and open the website in full screen mode
@marcofugaro
marcofugaro / .hyper.js
Last active Apr 23, 2019
Hyper sync settings
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'canary',
View accurato.js
//
// $$$$$$$$\ $$$$$$\ $$$$$$\
// $$ _____|$$ __$$\ $$ __$$\
// $$ | $$ / \__|$$ / \__|
// $$$$$\ $$ |$$$$\ $$ |$$$$\
// $$ __| $$ |\_$$ |$$ |\_$$ |
// $$ | $$ | $$ |$$ | $$ |
// $$$$$$$$\ \$$$$$$ |\$$$$$$ |
// \________| \______/ \______/
//
View Nature of code notes.md
@marcofugaro
marcofugaro / init.coffee
Last active Dec 9, 2017
My atom configuration
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@marcofugaro
marcofugaro / README.md
Last active May 24, 2019
Paste this in the console of your github profile page and start drawing on your contributions!
View README.md

Made to work along with gitfiti, you can draw with this tool and then export the data and use it with gitfiti.

##Usage

  1. Paste the code in the console of any github profile page which has the contributions graph
  2. Start drawing! Left click to increment the color, right click to clear the cell, clear button to clear everything! Dragging also works!
  3. Once you're happy you can export the data by typing ContributionsDraw.export() into the console.
  4. Or if you want you can also import existing data with ContributionsDraw.import([...])

NOTE: This is developed for and tested in Chrome, other browsers might not support yet some ES6 stuff, you might need to compile it to ES5.

@marcofugaro
marcofugaro / index.html
Created Jan 13, 2016
`background-size: cover` and `background-position: center center` on img element with jQuery
View index.html
<div class="img-container">
<img src="http://placehold.it/550x800">
</div>
@marcofugaro
marcofugaro / contact-form.js
Last active Mar 11, 2016
simple php mail snippet with PHPMailer through SMTP and Google reCAPTCHA
View contact-form.js
var form = $('#form');
form.find('[type="submit"]').on('click', function(e) {
var isFormValid = form[0].checkValidity();
var isCaptchaOk = $('#g-recaptcha-response').val();
if(isFormValid && isCaptchaOk) {
e.preventDefault();
var dataObj = {
@marcofugaro
marcofugaro / handlebars-if.js
Created Nov 16, 2015
If operator in Handlebars.js
View handlebars-if.js
Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {
switch (operator) {
case '==':
return (v1 == v2) ? options.fn(this) : options.inverse(this);
case '===':
return (v1 === v2) ? options.fn(this) : options.inverse(this);
case '!=':
return (v1 != v2) ? options.fn(this) : options.inverse(this);
case '!==':
You can’t perform that action at this time.