Skip to content

Instantly share code, notes, and snippets.

penn201500 /
Created Sep 17, 2020 — forked from P7h/
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
penn201500 / toggle_keybindings.tmux.conf
Created Sep 17, 2020 — forked from samoshkin/toggle_keybindings.tmux.conf
tmux.conf excerpt to toggle on/off session keybindings and prefix handling
View toggle_keybindings.tmux.conf
bind -T root F12 \
set prefix None \;\
set key-table off \;\
set status-style "fg=$color_status_text,bg=$color_window_off_status_bg" \;\
set window-status-current-format "#[fg=$color_window_off_status_bg,bg=$color_window_off_status_current_bg]$separator_powerline_right#[default] #I:#W# #[fg=$color_window_off_status_current_bg,bg=$color_window_off_status_bg]$separator_powerline_right#[default]" \;\
set window-status-current-style "fg=$color_dark,bold,bg=$color_window_off_status_current_bg" \;\
if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\
refresh-client -S \;\
bind -T off F12 \
penn201500 / Restore the GRUB
Created Sep 11, 2020 — forked from dianjuar/Restore the GRUB
Restore the GRUB Bootloader on Manjaro Linux. Usefull when your fresh windows install eats your grub and can not boot into your linux installation, or for some how your grub is missing
View Restore the GRUB

Restore the GRUB Bootloader on Manjaro

  1. Chroot into your linux instalation
    1. The easiest way is with mhwd-chroot
      1. Install it yaourt -S mhwd-chroot
      2. Run it sudo mhwd-chroot
      3. DONE, you have chrooted into your linux installation (open a root console of your installed linux OS, is like just open a console with root access)
  2. Restore your GRUB
    1. Install a new GRUB bootloader with grub-install /dev/sda
  3. Recheck to ensure the that installation has completed without any errors grub-install --recheck /dev/sda
penn201500 / github.css
Created Sep 9, 2020 — forked from andyferra/github.css
Github Markdown CSS - for Markdown Editor Preview
View github.css
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
penn201500 /
Created Mar 18, 2020 — forked from enihsyou/
Create a RamDisk backup DMG image on macOS, detail in Chinese 中文:
#!/usr/bin/env bash
sudo hdiutil create -srcfolder $DISK_LOCATION $IMAGE_LOCATION -ov
sudo chown enihsyou $IMAGE_LOCATION
penn201500 /
Created Mar 18, 2020 — forked from scottsb/
Create and manage a case-sensitive disk-image on macOS (OS X).
# ---------------------------------------------------------
# Customizable Settings
# ---------------------------------------------------------
penn201500 /
Created Mar 13, 2020 — forked from adammorris/
Example snippet on how to sync from JIRA to OmniFocus.
Example snippet on how to sync from JIRA to omnifocus.
The main function is OmniFocus.sync_jira_to_omnifocus().
OmniFocus.process_jira_data() is customized to filter projects based on my own needs and will need updating.
from applescript import AppleScript, ScriptError
from datetime import datetime
from json import JSONDecoder
from logging import getLogger
penn201500 /
Created Mar 10, 2020 — forked from koshigoe/
Like tmpfs in Mac OSX
# This program has two feature.
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
# Usage:
# $0 <dir> <size>
penn201500 / proj2ram
Created Mar 9, 2020 — forked from redguardtoo/proj2ram
script to copy project to tmpfs
View proj2ram
if [ -z "$1" ];then
echo "Usage:"
echo " proj2ram proj-name"
echo " proj2ram restore proj-name"
exit 1
penn201500 / tmux-cheatsheet.markdown
Created Dec 12, 2019 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程
View tmux-cheatsheet.markdown

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程


tmux [new -s 会话名 -n 窗口名]