Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| <?php | |
| // prepare arguments | |
| $args = array( | |
| 'orderby' => 'display_name', // Order by display name | |
| 'exclude' => array( 2, 5, ), // Remove the two main admins | |
| ); | |
| // Create the WP_User_Query object |
| [alias] | |
| co = checkout | |
| st = status | |
| rso = remote show origin | |
| # e.g. git graphviz --first-parent master | dotty /dev/stdin | |
| graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f" | |
| # Pretty log | |
| lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
| # Print out all commits whose hash starts with a given string | |
| abbr = "!sh -c 'git rev-list --all | grep ^$1 | while read commit; do git --no-pager log -n1 --pretty=format:\"%H %ci %an %s%n\" $commit; done' -" |
| <?php # -*- coding: utf-8 -*- | |
| /** | |
| * Plugin Name: Plugin Class Demo | |
| * Description: How I am using the base class in plugins. | |
| * Plugin URI: | |
| * Version: 2012.09.29 | |
| * Author: Fuxia Scholz | |
| * License: GPL | |
| * Text Domain: plugin_unique_name | |
| * Domain Path: /languages |
| /* The Grid ---------------------- */ | |
| .lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
| .lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
| .lt-ie9 .row.large-collapse .column, | |
| .lt-ie9 .row.large-collapse .columns { padding: 0; } | |
| .lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
| .lt-ie9 .row .row.large-collapse { margin: 0; } | |
| .lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
| .lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
| 'use strict'; | |
| module.exports = function(grunt) { | |
| // load all grunt tasks | |
| require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); | |
| grunt.initConfig({ | |
| // watch for changes and trigger compass, jshint, uglify and livereload | |
| watch: { |
| ———————————————————————————————————————————————————————————————————————————————————————————————————— | |
| BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19 | |
| ———————————————————————————————————————————————————————————————————————————————————————————————————— | |
| NOTES: | |
| The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use. | |
| Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete. |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| # A simple Makefile alternative to using Grunt for your static asset compilation | |
| # | |
| ## Usage | |
| # | |
| # $ npm install | |
| # | |
| # And then you can run various commands: | |
| # | |
| # $ make # compile files that need compiling | |
| # $ make clean all # remove target files and recompile from scratch |
| <?php | |
| /** | |
| * Change text strings | |
| * | |
| * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
| */ | |
| function my_text_strings( $translated_text, $text, $domain ) { | |
| switch ( $translated_text ) { | |
| case 'Related Products' : | |
| $translated_text = __( 'Check out these related products', 'woocommerce' ); |
| <?php | |
| /* | |
| Example of accessing the Google Geocoding API and getting results in XML | |
| Info here: https://developers.google.com/maps/documentation/geocoding/ | |
| */ | |
| $base_url = 'http://maps.googleapis.com/maps/api/geocode/'; | |
| $format = 'xml'; // 'xml' or 'json' | |
| $address = 'address='.urlencode('350 5th Avenue New York, NY'); // makes the text URL friendly, ie, 350+5th+Avenue+New+York%2C+NY | |
| $url = $base_url.$format.'?'.$address.'&sensor=false'; // Google requires 'sensor=false' parameter |