Skip to content

Instantly share code, notes, and snippets.

View simbados's full-sized avatar

Simon simbados

View GitHub Profile
If you want to disable zoom on mobile use the following meta tag:
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
This will archieve the following:
- user can not zoom in or zoom out
- the page will always have a scale factor of 1
- as an added "bonus" this will get rid of the browser bounce, when the user reaches the end of the page while scrolling.
Use this technique with caution, because the accessibility of your page will suffer drastically.
No zooming means that your page might not be visible on some devices and that users have difficulty with accessing your website.
@simbados
simbados / gist:dd562d4458d15cebc1476ff5de0b8876
Last active January 21, 2024 15:01
Burger with animation Vue3

This is a basic Burger Menu, which will animate to a X
Set your desired with through the css var --width

<script setup lang="ts">
defineProps<{
  isOpen?: boolean
}>()
const emit = defineEmits(['toggle'])
@simbados
simbados / gist:b7e332c7ec4b0abfc2f5403735150bb3
Created February 14, 2024 19:35
Reproducible build for your go binaries

If you build your binaries in a pipeline you want them to be reproducible across platforms. Build your program with
env GOOS=<system> GOARCH=<architecture> CGO_ENABLED=0 go build -trimpath main.go

Replace with your desired system. Replace with your desired architecture.

Options can be found here: https://go.dev/src/go/build/syslist.go