This file contains 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
#NoEnv | |
#NoTrayIcon | |
#SingleInstance force | |
SendMode Input | |
SetWorkingDir %A_ScriptDir% | |
SetCapsLockState, AlwaysOff | |
CapsLock::Send, {CtrlDown}{Space}{CtrlUp} |
This file contains 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 | |
[[ -z $1 ]] && echo "flv2mp4 <flv name>" | |
src=$1 | |
if [[ -d $src ]] && command -v fzf > /dev/null 2>&1; then | |
src="$(fd . -e flv "$src" | fzf -e -m)" | |
fi |
This file contains 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 | |
channel_cmd="ipmitool channel info" | |
lan_cmd="ipmitool lan print" | |
function is_lan_channel() | |
{ | |
local chan=$1 | |
$channel_cmd $chan 2>&1 | grep LAN -q | |
if [[ $? -eq 0 ]]; then | |
return 1 |
This file contains 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
let s:rc_path = fnamemodify(expand('<sfile>'), ':h') | |
let s:vimplug = expand(s:rc_path . '/autoload') | |
if empty(glob(s:vimplug . '/plug.vim')) | |
execute '!git clone --depth=1 https://github.com/junegunn/vim-plug' s:vimplug | |
augroup vimrc | |
autocmd VimEnter * PlugInstall | |
augroup END | |
endif |
This file contains 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 | |
wifi="Wi-Fi" | |
IP=127.0.0.1 | |
PORT=7777 | |
[[ $# -ne 1 ]] && echo "$0 http|pac|disable" && exit 1 | |
flag=$1 | |
function webproxy_set() { |
This file contains 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
ACTION=="change", SUBSYSTEM=="backlight", RUN+="/usr/sbin/intelbacklight.sh" |
This file contains 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 | |
set -e | |
[[ -z $1 ]] && echo "$(basename $0) <image>" && exit 1 | |
image=$1 | |
[[ ! -e $image ]] && echo "Invalid image file" && exit 1 | |
sudo losetup -o 1048576 -f $image |
This file contains 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 | |
PATTERN='^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$' | |
print_usage() { | |
echo "Need NIC name" | |
echo "usage: $0 eth0 00:11:22:33:44:55" | |
} | |
if [ -z $1 ]; then |
This file contains 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
powershell Set-ExecutionPolicy unrestricted -Scope CurrentUser |
This file contains 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
// Package main provides ... | |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
) | |
func HelloServer(w http.ResponseWriter, req *http.Request) { |
NewerOlder