Skip to content

Instantly share code, notes, and snippets.

@augustolazaro
augustolazaro / useLocalStorage.ts
Last active June 7, 2023 11:01
React hook to manage local storage changes
import * as React from 'react'
const originalSetItem = localStorage.setItem
localStorage.setItem = function() {
const event = new Event('storageChange')
document.dispatchEvent(event)
originalSetItem.apply(this, arguments)
}
const originalRemoveItem = localStorage.removeItem
localStorage.removeItem = function() {
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active July 25, 2024 10:23
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

@MarvinJWendt
MarvinJWendt / wordlist-german.txt
Created September 7, 2017 03:19
All german words (german wordlist).
This file has been truncated, but you can view the full file.
AA
AAA
Aachen
Aachener
Aachenerin
Aachenerinnen
Aachenern
Aacheners
Aachens
Aal
@nikhita
nikhita / update-golang.md
Last active July 27, 2024 06:11
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@guerrerocarlos
guerrerocarlos / chromecast_with_subtitles.html
Created January 21, 2017 12:45
The chromecast documentation for Chrome is terrible, so to save other's some time, here is the straigt-forward way to stream something quickly and with subtitles
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
</head>
<body>
@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active July 28, 2024 11:11
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4