This file contains hidden or 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
" make < > shifts keep selection | |
vnoremap < <gv | |
vnoremap > >gv |
This file contains hidden or 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
" relative line numbers | |
set relativenumber | |
autocmd InsertEnter * :set number | |
autocmd InsertLeave * :set relativenumber |
This file contains hidden or 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 | |
trap stop SIGINT SIGHUP | |
usage() { | |
track=`basename $0` | |
echo "usage: $track <time> <name> [--quiet]" | |
} | |
# Validate usage |
This file contains hidden or 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
<?php | |
/** | |
* The base configurations of the WordPress. | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. | |
* | |
* This file is used by the wp-config.php creation script during the |
This file contains hidden or 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
Exec { path => "/bin:/usr/bin:/usr/local/bin:/usr/sbin" } | |
stage { 'pre': before => Stage['main'] } | |
class { 'pre': stage => pre } | |
class pre { | |
exec { 'apt-get update': } | |
} | |
package { 'nginx': ensure => present } |
This file contains hidden or 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
-- Set password and file name | |
set itemPath to quoted form of (POSIX path of theFile) | |
set passwd to do shell script "openssl rand -base64 32" | |
set hash to do shell script "openssl sha1 " & itemPath & " | awk -F'= ' '{print $2}'" | |
-- set file name | |
tell application "Finder" | |
set file_name to name of theFile | |
set file_name to text 1 thru ((offset of "." in file_name) - 1) of file_name | |
set file_ext to name extension of theFile |
This file contains hidden or 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
ssh-copy-id() { | |
USER=$(whoami) | |
USAGE="Usage: `basename $0` [-i FILE] user@host" | |
FILE="$HOME/.ssh/id_rsa.pub" | |
if [ $# -lt 1 ]; then | |
echo "$USAGE" | |
fi | |
This file contains hidden or 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 "System Events" | |
repeat with p in (every process whose visible is true) | |
try | |
my setFullScreen(displayed name of p, 0, true) | |
end try | |
end repeat | |
end tell | |
(* | |
Sets the fullscreen status for either the front window or all windows of the specified, *AppleScript-enabled* application. |