View duplicates.sql
SELECT post_title, COUNT(*) c FROM wp_posts WHERE post_type = 'post' GROUP BY post_title HAVING c > 1
View delete.sql
DELETE p, pm FROM wp_posts p JOIN wp_postmeta pm ON p.ID = pm.post_id WHERE p.post_type = 'post'
View acf-fix.php
<?php
add_action( 'admin_init', 'prefix_reset_metabox_positions' );
function prefix_reset_metabox_positions(){
delete_user_meta( 1, 'meta-box-order_post' );
delete_user_meta( 1, 'meta-box-order_page' );
delete_user_meta( 1, 'meta-box-order_custom_post_type' );
}
View ruby-commands.md

Unutar rubyja

Konzola binding.pry Exit: exit-program Next: Ctrl+D

View query-time.php
<?php
$current_time = microtime( true );
$query_args = array(
// query goes here.
);
$search_results = new WP_Query( $query_args );
$end_time = microtime( true );
View Default (OSX).sublime-keymap
[
{ "keys": ["ctrl+alt+a"], "command": "alignment" },
{"keys": ["super+shift+."], "command": "insert_snippet", "args": {"contents": "error_log( print_r( , true ) );"}},
{"keys": ["super+shift+m"], "command": "insert_snippet", "args": {"contents": "print_r('<pre>');\nprint_r( );\nprint_r('</pre>');"}},
{"keys": ["super+shift+-"], "command": "insert_snippet", "args": {"contents": "<?php ?>"}}
]
View SublimeLinter.sublime-settings
{
"user": {
"debug": true,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"csslint": {
View Preferences.sublime-settings
{
"always_show_minimap_viewport": true,
"auto_upgrade": false,
"bold_folder_labels": false,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"detect_indentation": true,
"ensure_newline_at_eof_on_save": true,
"find_selected_text": true,
"font_face": "Inconsolata",
"fade_fold_buttons": false,
View keybindings.json
[
{
"key": "cmd+shift+z",
"command": "editor.action.insertSnippet",
"args": {
"snippet": "error_log( print_r( , true ) );"
}
},
{
View svg-replace.js
// Replace all SVG images with inline SVG
$('img.svg, #main_logo').each(function(){
var $img = $(this);
var imgID = $img.attr('id');
var imgClass = $img.attr('class');
var imgURL = $img.attr('src');
$.get(imgURL, function(data) {
// Get the SVG tag, ignore the rest