Skip to content

Instantly share code, notes, and snippets.

View bew's full-sized avatar
😎
https://nohello.net

Benoit de Chezelles bew

😎
https://nohello.net
View GitHub Profile
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active May 18, 2024 19:05
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@Papierkorb
Papierkorb / 00_LICENSE.md
Last active April 25, 2017 19:41
Struct-by-reference helper class

Copyright (c) 2017 Stefan Merettig

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all

# This isn't meant to be ran as a script, but line-by-line
# Props to Binary (benary.org) for helping me with this
# 0: Create a Scaleway instance and SSH into it
ssh root@...
# 1: Install Nix
adduser user # set a password, doesn't matter what because it's not staying long
adduser user sudo
su -l user
Window
----
N new widnow
P new private window
W close window
o quick command # this is really helpful when used as key sequnce e.g. pressing o r d in sequence brings me to reddit immediately as 'o' to show quick command window and 'rd' is nickname of reddit in my bookmarks
+Esc Task Manager
E extensions
Y history
? keyboard cheatsheet
@chainat
chainat / gist:e2d4d806b8b1a3ddb6d5b8400e1e30ea
Last active May 28, 2022 20:07
Compact local git repo
These two commands will minimise the diskspace used for the repo. Please note that Github, BitBucket run this all the time to minimise the diskspace.
Suggestion: Run as often as you can (i.e. once a week for small working-in-progress repo, one in every few days if many people work together).
It's no harm to run it often, cron or system task could be an option too.
# Clean unused commits
`git reflog expire --all --expire=now`
# Compact the disk by remove unneccesary files from the local git repository
`git gc --aggressive --prune=now`
@kawanet
kawanet / material-colors.json
Last active April 18, 2024 07:43
Material Design Style Color Palette as JSON
{
"red": {
"50": "#ffebee",
"100": "#ffcdd2",
"200": "#ef9a9a",
"300": "#e57373",
"400": "#ef5350",
"500": "#f44336",
"600": "#e53935",
"700": "#d32f2f",
@pocketkk
pocketkk / keymap.c
Created April 13, 2016 19:20
Chord and Pick Keymap
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
// this is the style you want to emulate.
#include "planck.h"
#ifdef BACKLIGHT_ENABLE
#include "backlight.h"
#endif
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
@novaluke
novaluke / 0-Q&A.md
Last active April 29, 2023 17:23
I want to use Nix for development, but... -- answers to common concerns about Nix

Nix seems perfect for developers - until I try to use it...

Want to use Nix for development but you're not sure how? Concerned about the fluidity of nixpkgs channels or not being able to easily install arbitrary package versions?

When I first heard about Nix it seemed like the perfect tool for a developer. When I tried to actually use it for developing and deploying web apps, though, the pieces just didn't seem to add up.

KC60 Keyboard end-user tips, tricks, programming notes, etc.

Leimi's note: removed lots of stuff from the original gist of scottjl, (thanks to him by the way!), as in the end some wasn't useful for me. If you are intestered, go check the gist revisions.

The KC60 is kinda like a premade GH60 that was first sold on Massdrop during summer 2015.
It runs on TMK firmware, or something based on it at least (not sure this is the real source for the keyboard but it seems it is), which means it's heavily programmable.
There is a GUI tool (the source of this tool seems to be here) and a command-line tool to ease up the process of programming the board.
**Go check this great article on Key

@sephirot47
sephirot47 / GLSL Raymarch ShaderToy tutorial and example code
Created June 29, 2015 12:28
GLSL Raymarch ShaderToy tutorial and example code
/*
a shader executes per pixel
so every thing you see here is he function for every pixel
raymarching is in principe a function that finds the closest point to any surface in the world
then we move our point by that distance and use the same function,
the function will probably be closer to an object in the world every time
and after about 40 to 200 iterations you'll either have found an object or
missed them all into infinity