Skip to content

Instantly share code, notes, and snippets.

View marcofugaro's full-sized avatar

Marco Fugaro marcofugaro

View GitHub Profile
@marcofugaro
marcofugaro / requestDeviceOrientation.js
Last active January 7, 2021 12:16
Function to request device orientation on Android and iOS devices, remember to use HTTPS
export function requestDeviceOrientation(fn, createTrigger) {
// iOS 13+
if (
window.DeviceOrientationEvent !== undefined &&
typeof window.DeviceOrientationEvent.requestPermission === 'function'
) {
// check if the user gave permissin in the past
window.DeviceOrientationEvent.requestPermission().then((response) => {
if (response == 'granted') {
fn()
@marcofugaro
marcofugaro / Unity C# Reference.md
Last active May 10, 2020 15:37
Unity C# Reference

Unity C# Reference

Types

  • string
  • int
  • float
@marcofugaro
marcofugaro / falasco.jpg
Created January 23, 2020 10:22
Print falasco face in console when running "websocket"
https://i.imgur.com/f61MKLO.jpg
@marcofugaro
marcofugaro / autostart
Last active November 18, 2019 16:24
Raspberry PI 4 fullscreen mode script, put this in `~/.config/lxsession/LXDE-pi/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 April 23, 2019 11:29
Hyper sync settings
// 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',
@marcofugaro
marcofugaro / accurato.js
Last active December 4, 2020 09:10
Easter egg for the page https://www.accurat.it/about/
//
// $$$$$$$$\ $$$$$$\ $$$$$$\
// $$ _____|$$ __$$\ $$ __$$\
// $$ | $$ / \__|$$ / \__|
// $$$$$\ $$ |$$$$\ $$ |$$$$\
// $$ __| $$ |\_$$ |$$ |\_$$ |
// $$ | $$ | $$ |$$ | $$ |
// $$$$$$$$\ \$$$$$$ |\$$$$$$ |
// \________| \______/ \______/
//
@marcofugaro
marcofugaro / Nature of code notes.md
Last active September 27, 2018 22:54
Nature of code notes
@marcofugaro
marcofugaro / init.coffee
Last active December 9, 2017 17:32
My atom configuration
# 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 ->