Skip to content

Instantly share code, notes, and snippets.

View SiegfriedEhret's full-sized avatar
✔️
Verified account

Siegfried Ehret SiegfriedEhret

✔️
Verified account
View GitHub Profile
@SiegfriedEhret
SiegfriedEhret / run.js
Last active October 11, 2023 08:06
Remove some YouTube subscriptions (but more are loaded when I scroll so voilà) #WorksOnMyComputer
// Go to https://www.youtube.com/feed/channels
async function wait(cb) {
return new Promise(resolve => {
cb();
setTimeout(resolve, 250);
})
}
async function run() {
@SiegfriedEhret
SiegfriedEhret / macosx-java.md
Created August 25, 2021 08:34
Mac OS X and multiple Java versions
# https://stackoverflow.com/a/42544963
# using numfmt on GNU
git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | cut -c 1-12,41- | numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
# using gnumfmt on MacOS
git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | cut -c 1-12,41- | gnumfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
@SiegfriedEhret
SiegfriedEhret / tmux-cheatsheet.markdown
Created November 19, 2020 05:28 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@SiegfriedEhret
SiegfriedEhret / Trucs.md
Created August 7, 2017 14:29
Des trucs

pour arrêter tous les conteneurs

docker ps | awk '{print $1}' | tail -n +2 | xargs docker stop

Keybase proof

I hereby claim:

  • I am siegfriedehret on github.
  • I am siegfriedehret (https://keybase.io/siegfriedehret) on keybase.
  • I have a public key ASCdO3WIkOsGWxoivfeRoDfBGoYmbFSMO2ln4WYoAfaRTQo

To claim this, I am signing this object:

@SiegfriedEhret
SiegfriedEhret / pull.go
Created May 9, 2016 04:53 — forked from sithembiso/pull.go
git pull using git2go
func (repo *Repo) Pull() error {
branch, err := repo.Branch()
if err != nil {
return err
}
// Get the name
name, err := branch.Name()
if err != nil {
return err
@SiegfriedEhret
SiegfriedEhret / 60-jetbrains.conf
Created October 31, 2015 18:33 — forked from bittner/60-jetbrains.conf
Inotify configuration for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). Create this file with e.g. `sudo vim /etc/sysctl.d/60-jetbrains.conf`
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm).
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and
# run `sudo service procps start` or reboot.
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
#
# More information resources:
# -$ man inotify # manpage
# -$ man sysctl.conf # manpage
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use
/**
* Module dependencies.
*/
var express = require('express'), namespace = require('express-namespace');
var app = module.exports = express.createServer();
// Configuration