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 | |
/** | |
* Remove any non-ASCII characters and convert known non-ASCII characters | |
* to their ASCII equivalents, if possible. | |
* | |
* @param string $string | |
* @return string $string | |
* @author Jay Williams <myd3.com> | |
* @license MIT License | |
* @link http://gist.github.com/119517 |
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
# --------------------------------------------------------- | |
# font and size | |
# --------------------------------------------------------- | |
fontName = "Menlo" | |
fontSize = 14 | |
# --------------------------------------------------------- | |
# Display the name of the home directory | |
# --------------------------------------------------------- | |
windowTitleProject = '${projectDirectory:+ — ${projectDirectory/^.*\///}}' |
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
# configuration for osx clipboard support | |
set-option -g default-command "reattach-to-user-namespace -l sh" |
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
[ | |
{ "keys": ["super+x"], "command": "clipboard_history_cut" }, | |
{ "keys": ["super+c"], "command": "clipboard_history_copy" }, | |
{ "keys": ["super+v"], "command": "clipboard_history_paste" }, | |
{ "keys": ["super+shift+v"], "command": "clipboard_history_previous_and_paste" }, | |
{ "keys": ["super+pagedown"], "command": "clipboard_history_next" }, | |
{ "keys": ["super+pageup"], "command": "clipboard_history_previous" }, | |
{ "keys": ["super+alt+ctrl+v"], "command": "clipboard_history_choose_and_paste" } |
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
# Installing PHP 7.4.33 as CGI/FastCGI on a Pair Networks VPS | |
# By Jay Williams <http://myd3.com/> | |
# Based off of the Pair Users wiki page "Installing PHP5 as cgi" <http://www.pairusers.com/?How%20to%20install%20PHP5> | |
# Note: Replace "USERNAME" with your actual server username | |
# Make src directory in home | |
mkdir ~/src | |
# Download, configure, and compile OpenSSL |
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 :stages, %w(production staging) | |
set :default_stage, "staging" | |
require 'capistrano/ext/multistage' | |
# -------------------------------------------- | |
# Repository | |
# -------------------------------------------- | |
set :scm, :git # I am using git, so I specify it here | |
set :repository, "<repo>" # This is the path to the repository on the server, we pushed the code here earlier. |
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 | |
/** | |
* Convert a comma separated file into an associated array. | |
* The first row should contain the array keys. | |
* | |
* Example: | |
* | |
* @param string $filename Path to the CSV file | |
* @param string $delimiter The separator used in the file | |
* @return array |
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
# -------------------------------------------- | |
# General | |
# -------------------------------------------- | |
set :shared_children, %w(cache logs) # Shared directories, these directories contain generated content which should not be wiped out during deployments. | |
set :application, "domain.com" # Application name | |
set :deploy_to, "/var/www/#{application}/#{stage}" # Path where files are deployed to ... | |
# -------------------------------------------- | |
# Server | |
# -------------------------------------------- |
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 | |
/** | |
* Parse a string, and convert it into a series of sequential numbers. | |
* It works similar to Acrobat's print specified pages input box. | |
* | |
* Examples: | |
* | |
* input: "1, 2, 3, 4, 5, 6" --> output: 1, 2, 3, 4, 5, 6 | |
* input: "1-6" --> output: 1, 2, 3, 4, 5, 6 |
NewerOlder