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
# Don't hard code device id and prop id | |
bash -c "xinput --set-prop $(xinput list --id-only 'Elan Touchpad') 'libinput Tapping Enabled' 1; xinput --set-prop $(xinput list --id-only 'Elan Touchpad') 'libinput Tapping Drag Lock Enabled' 1;" |
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
while true | |
do | |
if [ ! -d "/run/user/1000/gvfs/smb-share:server=172.16.210.1,share=homes/liyafe1997/Drive" ]; then | |
echo NAS did not mounted. | |
exit | |
fi | |
date=$(date +%Y-%m-%d-%H-%M-%S) | |
mkdir -p "/run/user/1000/gvfs/smb-share:server=172.16.210.1,share=homes/liyafe1997/Drive/BackupSITBishe$date" | |
cp -R * "/run/user/1000/gvfs/smb-share:server=172.16.210.1,share=homes/liyafe1997/Drive/BackupSITBishe$date" | |
echo $date Backup |
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
$key = Get-Item -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run | |
$key.GetValueNames() | | |
ForEach-Object { | |
$ValueName = $_ | |
$rv = 1 | Select-Object -Property Name, Type, Value | |
$tostart = $key.GetValue($ValueName) | |
echo $tostart | |
Start-Process cmd "/c $tostart" -WindowStyle Hidden |
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
echo off | |
title 请不要关闭本窗口 | |
cls | |
echo 正在连接iSCSI...... | |
echo 如果长时间连接不上,请检查网络 | |
if not exist D:\Desktop ( | |
goto aaa | |
) else ( | |
exit | |
) |
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
#!/bin/bash | |
while(( 1 )) | |
do | |
clear | |
optirun nvidia-smi | |
sleep 1 | |
done |
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
sudo systemctl restart bumblebeed.service | |
echo Now bbswitch power state | |
cat /proc/acpi/bbswitch | |
echo ------------------------- | |
sudo systemctl stop nvidia-persistenced.service | |
sleep 1 | |
sudo rmmod ipmi_msghandler ipmi_devintf nvidia nvidia_modeset nvidia nvidia_drm nvidia_uvm | |
echo ------------------------- | |
sleep 1 | |
sudo rmmod ipmi_msghandler ipmi_devintf nvidia nvidia_modeset nvidia nvidia_drm nvidia_uvm |
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
1. Enable Custom Touchpad setting (But seems only work with gnome-flashback&metacity) | |
In /usr/share/X11/xorg.conf.d/51-synaptics-userdefined.conf | |
Section "InputClass" | |
Identifier "touchpad catchall" | |
Driver "synaptics" | |
MatchIsTouchpad "on" | |
Option "LockedDrags" "true" | |
Option "PalmDetect" "true" | |
Option "HorizTwoFingerScroll" "true" | |
MatchDevicePath "/dev/input/event*" |
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
If($args){sudo.bat powershell -NoExit -Command "(cd "$pwd");("$args")"}Else{sudo.bat powershell -NoExit -Command "cd "$pwd} |
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
@echo off | |
powershell -Command "(($arg='/k cd /d '+$pwd+' && %*') -and (Start-Process cmd -Verb RunAs -ArgumentList $arg))| Out-Null" | |
@echo on |