Skip to content

Instantly share code, notes, and snippets.

View toc21c's full-sized avatar
🏠
Working from home

0x323143 toc21c

🏠
Working from home
View GitHub Profile

Windows 10 - tmux 설치

사전 설치

tmux 설치

  • pacman -S tmux (MSYS2 shell에서)
  • tmux, msys-event-core.dll, msys-event.dll (C:\msys64\usr\bin) 파일 복사
  • C:\Program Files\Git\mingw64\bin 파일 붙여넣기
echo "This script requires superuser access to install rpm packages."
echo "You will be prompted for your password by sudo."
# clear any previous sudo permission
sudo -k
# run inside sudo
sudo sh <<SCRIPT
# add GPG key
@toc21c
toc21c / dropbox-better.sh
Created September 11, 2016 13:48
Elementary OS loki
#!/usr/bin/env bash
# stop it if it's running
dropbox stop &>/dev/null
# start it properly
env XDG_CURRENT_DESKTOP=Unity QT_STYLE_OVERRIDE="" dropbox start -i
@toc21c
toc21c / rsmv.sh
Created September 7, 2016 16:33
rsync copy & remove folder
#!/usr/bin/env bash
if [ $# -ne 2 ]; then
echo "Usage: ${0##*/} SRC DEST"
exit
fi
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: ${0##*/} SRC DEST"
exit
fi
#!/usr/bin/env bash
rsync -a --stats --progress .??* ~/old_dotfiles/
#!/usr/bin/env bash
find . -name "*.gz" | xargs -P 5 -I fileName sh -c 'gunzip -c "fileName" > "$(basename -s .gz "fileName")"'
#!/usr/bin/env bash
find . -name '*.txt' -type f -print0 | wc -l --files0-from=-
#!/bin/bash
# origin:
# https://bbs.archlinux.org/viewtopic.php?id=171655
#inspired of:
# http://unix.stackexchange.com/questions/4489/a-tool-for-automatically-applying-randr-configuration-when-external-display-is-p
# http://ozlabs.org/~jk/docs/mergefb/
# http://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes/181543#181543
# arandr script
@toc21c
toc21c / fix-sami.py
Last active January 21, 2016 12:25 — forked from ageldama/fix-sami.py
fix-sami.py python3
import sys
import os
import tempfile
import shutil
def fix(src_filename, dst_filename, src_enc, dst_enc):
with open(src_filename, mode='r', encoding=src_enc) as file_in:
with open(dst_filename, mode='w', encoding=dst_enc) as file_out:
file_out.write("""<SAMI>
<HEAD>
@toc21c
toc21c / Regenerate-Thumbnail.sh
Last active January 8, 2016 12:09
Nautilus-Script for recreate thumbnail
#!/bin/bash
BAKIFS=$IFS #internal filed separator
IFS=$'\n'
rm -rf ~/.cache/thumbnails/fail
for FILE in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do
touch -m "$FILE"
done