Skip to content

Instantly share code, notes, and snippets.

View giioohbernini's full-sized avatar
😎
Stay foolish, stay hungry.

Giovanni Bernini giioohbernini

😎
Stay foolish, stay hungry.
View GitHub Profile
@giioohbernini
giioohbernini / responsiveMenuWithGesture.js
Last active March 2, 2017 20:57
Responive Menu with swipe gesture
let body = document.querySelector("body");
let sidenav = document.querySelector(".side-nav");
function openNav() {
sidenav.style.transform = "translateX(250px)";
body.style.transform = "translateX(-250px)";
body.style.backgroundColor = "rgba(0,0,0,0.4)";
}
function closeNav() {
@giioohbernini
giioohbernini / showMyDistro.sh
Created March 2, 2017 20:56
This code show very informations about your linux system.
cat /etc/[A-Za-z]*[_-][rv]e[lr]*
@giioohbernini
giioohbernini / mouseDeceleration.sh
Created April 22, 2017 05:34
This script show how change the mouse's aceleration
#!/bin/bash
# The number "12" below will represent your device
# If you don't know your device code, use: xinput --list
# If you want see the others property, use: xinput -list-props X
# X = your device code
xinput --set-prop 12 "Device Accel Constant Deceleration" 2
(function() {
console.log('salve')
})()
@giioohbernini
giioohbernini / App.js
Last active July 28, 2020 13:55
Web to native #1
import React from 'react'
import {
BrowserRouter as Router,
Route,
} from 'react-router-dom'
import Root from './Root'
import Home from './pages/Home'
import About from './pages/About'
const AppRouter = () => {
@giioohbernini
giioohbernini / Home.js
Created July 28, 2020 14:02
Web no native #2
import React from 'react'
import isApp from 'utils/isApp'
const welcomeType = isApp
? 'Your app home page'
: 'Your web home page'
const Home = () => {
return (
<div>