Skip to content

Instantly share code, notes, and snippets.

View drmats's full-sized avatar
💭
Discovering mysteries.

Mat. drmats

💭
Discovering mysteries.
View GitHub Profile
@drmats
drmats / renamer.js
Last active April 30, 2020 13:54
renders renamer
#!/bin/node
/* MIT License, (c) 2020 xcmats */
/**
* usage:
* $ renamer.js [directory]
*
* set env. variable in windows 7+:
* > setx NODE_PATH C:\Windows\npm
@drmats
drmats / user.json
Created October 27, 2018 15:44
vscode settings
{
"telemetry.enableCrashReporter": false,
"telemetry.enableTelemetry": false,
"window.menuBarVisibility": "toggle",
"extensions.autoUpdate": false,
"workbench.iconTheme": "material-icon-theme",
"workbench.colorCustomizations": {
"editorIndentGuide.activeBackground": "#00c3ff6c"
},
"editor.autoClosingBrackets": "never",
@drmats
drmats / git-rewrite.sh
Created April 26, 2018 20:14
Git history rewrite (change author and e-mail)
#!/bin/sh
# https://help.github.com/articles/changing-author-info/
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@drmats
drmats / ffmpeg.sh
Last active December 2, 2019 14:21
FFmpeg commands
# linux screengrab
ffmpeg -f x11grab -video_size 1024x768 -i $DISPLAY -s 1024x768 -r 25 -preset ultrafast -b:v 10M output.mp4
# windows screengrab
ffmpeg -f gdigrab -video_size 1920x1200 -i desktop -s 1920x1200 -r 30 -preset ultrafast -b:v 10M wingrab.mp4
# screengrab with visible region
ffmpeg -f x11grab -video_size 1080x608 -show_region 1 -grab_x 100 -grab_y 100 -i $DISPLAY -s 1080x608 -r 25 -preset ultrafast -b:v 10M output.mp4
# video cut (no rerender)
@drmats
drmats / keybase.md
Created March 12, 2018 19:09
Keybase proof

Keybase proof

I hereby claim:

  • I am drmats on github.
  • I am xcmats (https://keybase.io/xcmats) on keybase.
  • I have a public key whose fingerprint is B9C1 D326 7B64 5F3F 6C45 85B5 CBFF 8A9B 9B57 08F5

To claim this, I am signing this object:

@drmats
drmats / poweroff.sh
Created March 10, 2018 11:23
Power off external hdd
# ...
udisksctl power-off -b /dev/sdb
# ...
hdparm -Y /dev/sdb
@drmats
drmats / plugins.txt
Last active August 20, 2019 07:14
GNOME Shell plugins
- AlternateTab: https://extensions.gnome.org/extension/15/alternatetab/
- Applications Menu: https://extensions.gnome.org/extension/6/applications-menu/
- Hide Top Bar: https://extensions.gnome.org/extension/545/hide-top-bar/
- Impatience: https://extensions.gnome.org/extension/277/impatience/
- Launch New Instance: https://extensions.gnome.org/extension/600/launch-new-instance/
- Net Speed: https://extensions.gnome.org/extension/104/netspeed/
- OpenWeather: https://extensions.gnome.org/extension/750/openweather/
- Pixel Saver: https://extensions.gnome.org/extension/723/pixel-saver/
- Places Status Indicator: https://extensions.gnome.org/extension/8/places-status-indicator/
- Services Systemd: https://extensions.gnome.org/extension/1034/services-systemd/
@drmats
drmats / tunnels.sh
Created November 22, 2017 15:49
SSH tunnels
# Reverse Tunnel
ssh -R *:REMOTE_LISTEN_PORT:localhost:LOCAL_LISTEN_PORT user@remotehost -p PORT -N -C -q
# Socks (v5) proxy
ssh -D 9150 user@remotehost -p PORT -N -C -q
# Fork and quiet
-f -q
# /etc/ssh/sshd_config
@drmats
drmats / gtk.css
Last active September 30, 2019 17:05
Minimal title bars in Gnome 3.20
window.ssd headerbar.titlebar {
padding-top: 4px;
padding-bottom: 4px;
min-height: 0;
}
window.ssd headerbar.titlebar button.titlebutton {
padding: 0;
min-height: 0;
min-width: 0;
@drmats
drmats / .tmux.conf
Last active February 9, 2018 15:15
tmux
source "/usr/share/tmux/powerline.conf"
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf