Skip to content

Instantly share code, notes, and snippets.

View marcofugaro's full-sized avatar

Marco Fugaro marcofugaro

View GitHub Profile
@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 / Unity C# Reference.md
Last active May 10, 2020 15:37
Unity C# Reference

Unity C# Reference

Types

  • string
  • int
  • float
@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()