Based on the timeless TextMate theme.
Foreground: #FEFFD3
Background: #141414
| 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 | |
| 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; |
| <?php | |
| /***************************************** | |
| * Created this test for job interviews. * | |
| *****************************************/ | |
| /** | |
| * Directions | |
| * | |
| * Read the direction in the Q and respond below A. |
| <html> | |
| <head> | |
| <title>IE Placeholder Text</title> | |
| </head> | |
| <body> | |
| <input type="text" name="myInputField" value="" placeholder="HTML5 Placeholder Text" id="myInputField"> |
| # 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 |
| <?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 |
| <?php | |
| /** | |
| * Convert a multi-dimensional array into a stdClass object. | |
| * | |
| * Example: | |
| * $values = array('hello'=>'world'); | |
| * | |
| * // Convert the array to an object | |
| * array_to_object($values); | |
| * |
| -- Get Wordpress posts that are within a specific date range | |
| -- Useful for an events calednar. | |
| SELECT wp_posts.ID, wp_posts.post_title, wp_posts.post_name, start.meta_value AS start_date, end.meta_value AS end_date | |
| FROM wp_postmeta AS `end` | |
| JOIN wp_postmeta AS `start` ON ( end.post_id = start.post_id ) | |
| JOIN wp_posts ON ( end.post_id = wp_posts.ID ) | |
| WHERE ( | |
| end.meta_key = "End Date" | |
| AND end.meta_value >= DATE_FORMAT( NOW() , "%Y/%m/%d") | |
| ) |
| diff a/includes/modules/shipping/perweightunit.php b/includes/modules/shipping/perweightunit.php | |
| 94c94 | |
| < global $order, $shipping_weight; | |
| --- | |
| > global $order, $shipping_weight, $shipping_num_boxes; | |
| 101,102c101,102 | |
| < 'cost' => (MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units) | |
| < + MODULE_SHIPPING_PERWEIGHTUNIT_HANDLING))); | |
| --- | |
| > 'cost' => ((MODULE_SHIPPING_PERWEIGHTUNIT_COST * $total_weight_units) |