Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
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
# -*- coding: utf-8 -*- | |
import datetime | |
from boto import rds | |
#設定 | |
AccessKey = '****' | |
AccessSecret = '****' | |
DbinstanceId = '****' | |
Region = 'ap-northeast-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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
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 | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
Remove rbenv and any rubies, gems etc.:
$ rm -rf ~/.rbenv
Uninstall rbenv if installed via Homebrew
$ brew uninstall rbenv
Remove references to rbenv in ~/.bash_profile
etc.
rsync (Everyone seems to like -z, but it is much slower for me)
- a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
- H: preserves hard-links
- A: preserves ACLs
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
#!/usr/bin/env bash | |
# Runs a command wrapped in btrfs snapper pre-post snapshots. | |
# Usage: $ snp <commands> | |
# e.g.: $ snp pacman -Syyu | |
# Requirements: snapper (https://wiki.archlinux.org/title/snapper) | |
# The latest version of this script is hosted at https://gist.github.com/erikw/5229436 | |
log_path="/var/local/log/snp" | |
date=$(date "+%Y-%m-%d-%H%M%S") | |
log_file="${log_path}/snp_${date}.log" |
OlderNewer