This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#find which mem chip exactly it is (in flashrom's internal naming scheme - the real chip is the 6406E, but flashrom combines it with the 6408E) | |
flashrom -L | grep MX25L | |
#read | |
flashrom -p linux_spi:dev=/dev/spidev0.0,spispeed=512 --chip MX25L6406E/MX25L6408E -r romread1.rom | |
#read a few times and compare with 'diff' to be sure read didn't have errors, just in case you have to flash back | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set speller "aspell -c" | |
set morespace | |
set nowrap | |
set softwrap | |
unset tempfile | |
set tabsize 2 | |
set tabstospaces | |
#set mouse | |
set smarthome | |
set suspend |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/lib/systemd/system/phabricator-phd.service | |
[Unit] | |
Description=phabricator-phd | |
After=syslog.target network.target | |
Before=apache2.service | |
[Service] | |
User=wwwrun | |
Group=www |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mute output device: | |
pactl set-sink-mute 0 toggle | |
mute input device: | |
pactl set-source-mute 0 toggle | |
Change output volume: | |
pactl set-sink-volume 0 +5% | |
pactl set-sink-volume 0 -5% | |
unsing named `analog-stereo` device for T420: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PS1='\[\033[0;35m\]\h\[\033[0;33m\] \w\[\033[00m\]: ' | |
export PROMPT_DIRTRIM=2 | |
alias l='ls -lhA --color=auto' | |
alias d='dirs -v' | |
function psauxgrep(){ | |
ps aux | grep $@ | grep -v grep | |
} | |
alias p=psauxgrep | |
alias jobs='jobs -l' | |
#git functions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mounting block device in lxc (specifically Proxmox 4) | |
1. Find devices' major & minor ID (need both dev + partition for HDD) | |
# ls -al /dev/sda | |
brw-rw---- 1 root disk 8, 0 Dec 19 11:16 /dev/sda1 | |
# ls -al /dev/sda1 | |
brw-rw---- 1 root disk 8, 1 Dec 19 11:16 /dev/sda1 | |
That's 8,0 for sda and 8,1 for sda1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xinput --set-prop 14 "Evdev Wheel Emulation" 1 | |
xinput --set-prop 14 "Evdev Wheel Emulation Button" 3 | |
xinput --set-button-map 14 1 3 2 4 5 | |
xinput --set-prop 14 "Evdev Third Button Emulation" 1 | |
xinput --set-prop 14 "Evdev Third Button Emulation Button" 2 | |
xinput --set-prop 14 "Evdev Third Button Emulation Timeout" 300 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#one line | |
echo battery > /sys/class/drm/card0/device/power_dpm_state | |
# or as toggle script | |
################################3 | |
#!/bin/sh | |
M1="battery" | |
M2="balanced" | |
MODE=`cat /sys/class/drm/card0/device/power_dpm_state` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on host, in order to mount /dev/sdX into kvm as /dev/vda | |
qm set [vm#] -virtio0 /dev/sdX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql buffer increase: | |
in /etc/mysql/my.cnf | |
-- innodb_buffer_pool_size=536870912 [512MB] | |
decrease root size by remapping /var/www/owncloud/data | |
this is the cache directory for uploads, that gets broken in every other patch, meaning loads of junk files there | |
map /var/www/owncloud/data -> /mnt/[nfs share]/dataroot to save space (soft symlink works) | |
OR | |
/var/www/owncloud/config/config.php | |
... |