まずpythonのpipをインストール
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
function auto_post_slug( $slug, $post_ID, $post_status, $post_type ) { | |
if ( preg_match( '/(%[0-9a-f]{2})+/', $slug ) ) { | |
$slug = utf8_uri_encode( $post_type ) . '-' . $post_ID; | |
} | |
return $slug; | |
} | |
add_filter( 'wp_unique_post_slug', 'auto_post_slug', 10, 4 ); |
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 | |
# +----------------------------------------------------------------------+ | |
# | | | |
# | Mount the root file system / with the option noatime | | |
# | | | |
# | By Philipp Klaus <http://blog.philippklaus.de> | | |
# | Tip found on <http://blogs.nullvision.com/?p=275> | | |
# | | | |
# +----------------------------------------------------------------------+ |
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 up Mac OS X to store temporary files in RAM rather than on disk.| | |
# | | | |
# | By Philipp Klaus <http://blog.philippklaus.de> | | |
# | | | |
# | Originally by Ricardo Gameiro <http://blogs.nullvision.com/?p=357> | | |
# | Changes by Daniel Jenkins | |
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/sh | |
# This program has two feature. | |
# | |
# 1. Create a disk image on RAM. | |
# 2. Mount that disk image. | |
# | |
# Usage: | |
# $0 <dir> <size> | |
# |
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/sh | |
# This program has two feature. | |
# | |
# 1. Create a disk image on RAM. | |
# 2. Mount that disk image. | |
# | |
# Usage: | |
# $0 <dir> <size> <name> | |
# |
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 | |
curl https://gist.githubusercontent.com/franciscocpg/e929676f28c321692237/raw/mount-ram.sh -o /usr/local/bin/mount-ram | |
chmod +x /usr/local/bin/mount-ram | |
curl https://gist.githubusercontent.com/franciscocpg/e929676f28c321692237/raw/umount-ram.sh -o /usr/local/bin/umount-ram | |
chmod +x /usr/local/bin/umount-ram |
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
tell application "Keyboard Maestro Engine" | |
--Fetch Variables from KM | |
--What? | |
set EFText to make variable with properties {name:"EasyFindText"} | |
set EFTextValue to value of EFText | |
--Where? | |
set EFLocation to make variable with properties {name:"EasyFindLocation"} | |
set EFLocationValue to value of EFLocation | |
--Which? |
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
// | |
// 現在処理中のドキュメントのテキストフレーム(s)に tf というXMLタグを付けるスクリプト | |
// InDesign CS3 | |
// | |
// ■事前に準備しておくXMLタグ | |
// page,tf,table,cell,image | |
// (タグ付きプリセットオプションにて セル→cellに設定しておくこと.) | |
// | |
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 sh | |
# Need super user privileges to edit hosts | |
SUDO='' | |
if (( $EUID != 0 )); then | |
SUDO='sudo' | |
fi | |
$SUDO cat <<EOT >> /etc/hosts |