Skip to content

Instantly share code, notes, and snippets.

wallace11

Block or report user

Report or block wallace11

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View disks.md

Tricks

Command Description
dd if=/dev/<sdx> bs=<bs> count=1 | hexdump -C hexdump -C -n <bytes> <dev> Print hexdump of a drive

Directory indexing

  1. Set hashed b-trees to speed up lookup for large dirs: tune2fs -O dir_index /dev/<SDX>
  2. Optimize directories (reindexing/sorting and compressing): e2fsck -D /dev/<SDX>
View Errors.md

Low Cython version

Makefile:2019: recipe for target 'src/cython/vapoursynth.c' failed
make: *** [src/cython/vapoursynth.c] Error 1

recipe for target 'src/cython/vapoursynth.c' failed

Probably due to Cython version 0.25.2 (Debian stretch default)

View Bug Fixes.md
dconf write /com/ubuntu/user-interface/scale-factor "{'DSI-1': 12, 'DSI1': 12}"
xinput set-prop "pointer:Goodix Capacitive TouchScreen" "Coordinate Transformation Matrix" 0 1 0 -1 0 1 0 0 1
View Audio.md

Extract bluray audio

ffmpeg -i VIDEO.m2ts -map 0:<stream> -acodec <pcm_s24le|libmp3lame> audio.<wav|mp3>
View Commands.md
Description Command Reference
Store credentials git config credential.helper store
Allow no comment on commit git config --global alias.nccommit 'commit -a --allow-empty-message -m ""' Source
Undo a commit git reset HEAD~
List remotes git remote -v
Change remote git remote set-url origin <URL> Reference
Append to last commit git commit --amend

Fresh start

View Tricks.md

Force display errors

error_reporting(E_ALL);
ini_set('display_errors', 1);

Disable caching in php.ini

opcache.enable=0
View SSH Server - Linux.md
  1. sudo apt-get remove openssh-server && sudo apt-get install openssh-server

  2. /etc/ssh/sshd_config:

    Change - PermitRootLogin no
    Add - AllowUsers yourusername
    Change - PasswordAuthentication yes
    Add - UsePrivilegeSeparation no
    Change - ListenAddress 0.0.0.0
    Change - Port 2200
    
View Find in Object.js
var check = OBJECT.find(function(obj) {
return obj.id == id;
});
You can’t perform that action at this time.