Based on the timeless TextMate theme.
Foreground: #FEFFD3
Background: #141414
<?php | |
function xpathEscape($query, $default_delim = '"') | |
{ | |
if (strpos($query, $default_delim) === false) | |
return $default_delim . $query . $default_delim; | |
preg_match_all("#(?:('+)|[^']+)#", $query, $matches); | |
list($parts, $apos) = $matches; | |
foreach ($parts as $i => &$part) { | |
$delim = $apos[$i] ? '"' : "'"; | |
$part = $delim . $part . $delim; |
curl https://nodeload.github.com/Anomareh/PHP-Twig.tmbundle/tarball/master | tar xvz -C ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/ && mv ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/Anomareh-PHP-Twig.tmbundle* ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/TWIG/ |
<?php | |
/** | |
* Convert a QuickBooks QBXML Report to HTML/CSV File | |
* | |
* I created this little script to help me read through the raw XML responses | |
* from QuickBooks. I originally built it to export to a CSV file, but found | |
* that a simple HTML table was better suited for my usage. However, I've | |
* included the CSV code below for anyone who may need that functionality. | |
* |
###Your problem with Vim is that you don't grok vi.
Source: http://stackoverflow.com/a/1220118/540977
You mention cutting with yy
and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy
is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).
The "Zen" of vi is that you're speaking a language. The initial y
is a verb. The statement yy
is a synonym for y_
. The y
is doubled up to make it easier to type, since it is such a common operation.
This can also be expressed as dd
P
(delete the current line and paste a copy back into place; leaving a copy in the anonymous register as a side effect). The y
and d
"verbs" take any movement as their "subject." Thus yW
is "yank from here (the cursor) to the end of the current/next (big) word" and y'a
is "yank from here to the line containing
<?xml version="1.0" encoding="UTF-8"?> | |
<modification> | |
<id>Display products in sub-categories while browsing a parent category</id> | |
<version>1.0.0</version> | |
<vqmver>2.4.0</vqmver> | |
<author>Jay Williams - [email protected]</author> | |
<file name="catalog/controller/product/category.php"> | |
<operation> | |
<search position="after"><![CDATA['filter_category_id' => $category_id,]]></search> | |
<add><![CDATA[ 'filter_sub_category' => true,]]></add> |
set :repo_url, '[email protected]:Design-Collective/some-repo.git' | |
set :application, 'the-app-name.com' | |
set :theme_name, 'sage' | |
# Branch options | |
# Prompts for the branch name (defaults to current branch) | |
#ask :branch, -> { `git rev-parse --abbrev-ref HEAD`.chomp } | |
# Hardcodes branch to always be master | |
# This could be overridden in a stage config file |
# Add this to your the Magento .htaccess file located in your docroot | |
############################################ | |
## Nginx proxy HTTPS Fix for Magento | |
## Source: https://www.sonassi.com/blog/magento-kb/magento-https-redirect-loop-2 | |
SetEnvIf X-Forwarded-Proto https HTTPS=on |
#!/usr/bin/env bash | |
set -e | |
# Dreamhost Mosh Install Script | |
# Jay Williams (https://gist.github.com/jaywilliams/c9ffab789b3f622abc932dd4cfaaeef5) | |
# Based on the gracious work of: | |
# Paul R Alexander (https://gist.github.com/palexander/2975305) | |
# Sami Samhuri https://gist.github.com/samsonjs/4076746 |
See Also: https://wiki.archlinux.org/index.php/Xorg#Setting_DPI_manually
Setting DPI manually Note: While you can set any dpi you like and applications using Qt and GTK will scale accordingly, it's recommended to set it to 96, 120 (25% higher), 144 (50% higher), 168 (75% higher), 192 (100% higher) etc., to reduce scaling artifacts to GUI that use bitmaps. Reducing it below 96 dpi may not reduce size of graphical elements of GUI as typically the lowest dpi the icons are made for is 96.
# The bang exclamation is used for comments in the Xresources file
nano $HOME/.Xresources
------------------------------------------------
!Xft.dpi: 96