Skip to content

Instantly share code, notes, and snippets.

HKEY_LOCAL_MACHINE\Software\Synaptics\SynTP\Defaults\
-- create a new key as a DWORD and name it as 'HasBothButtonFeature' without the quotes and set the value to 1.
Log off and Log on again
/var/www/owncloud/lib/private/util.php
- "readable by others" function change 'return $error' to 'return 0'
- https://forum.owncloud.org/viewtopic.php?f=29&t=25043
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
...
on host, in order to mount /dev/sdX into kvm as /dev/vda
qm set [vm#] -virtio0 /dev/sdX
#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`
@Waltibaba
Waltibaba / hp elitebook 8470p xinput scrolling emulation
Created November 16, 2015 21:22
For HP Elitebooks with only 2 trackpoint buttons
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
@Waltibaba
Waltibaba / lxc_mount_block_device
Last active October 6, 2024 02:46
Mount a block device like HDD inside an LXC container (specifically in proxmox 4)
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
@Waltibaba
Waltibaba / bashrc
Last active September 21, 2020 16:55
bashrc
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
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:
@Waltibaba
Waltibaba / gist:f0569397fadefafbdc4be40bad5cc98d
Last active January 11, 2020 22:53
phabricator daemon phd systemd services
/lib/systemd/system/phabricator-phd.service
[Unit]
Description=phabricator-phd
After=syslog.target network.target
Before=apache2.service
[Service]
User=wwwrun
Group=www