Skip to content

Instantly share code, notes, and snippets.

@seedprod
seedprod / vt_resize.php
Created November 15, 2011 14:45
Resize WordPress images on the fly vt_resize w/ multisite support
<?php
/*
* Resize images dynamically using wp built in functions
* Victor Teixeira
*
* php 5.2+
*
* Exemplo de uso:
*
* <?php
@meritt
meritt / social.js
Last active April 23, 2023 03:30
Асинхронное подключение Google Analytics, Google +1, Facebook SDK, Twitter Widgets и Вконтакте API
(function(window, document) {
window.___gcfg = { // Настройки языка для Google +1 Button
lang: 'ru'
};
window._gaq = [ // Настройки Google Analytics
['_setAccount', 'UA-XXXXXX-1'],
['_trackPageview'],
['_trackPageLoadTime']
];
@nicerobot
nicerobot / backup.sh
Last active April 15, 2022 23:13 — forked from joneskoo/gist-backup.py
Clone or update a user's gists locally
#!/bin/bash
curl -ks https://gist.githubusercontent.com/nicerobot/1622504/raw/gist-backup.py | USER=${USER} python3
@notmasteryet
notmasteryet / debug.js
Created January 18, 2012 03:15
pdf.js font instrumentation
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
// save the file as '<pdf.js>/font~/debug.js'
// bookmarklet -> javascript:(function(){if(window.fontDebugScript)%20return;%20var%20script%20=%20window.fontDebugScript%20=%20document.createElement('script');script.setAttribute('src',%20'../font~/debug.js');document.body.appendChild(script);})();
'use strict';
(function fontDebug() {
var fonts;
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@Zegnat
Zegnat / README.md
Created February 24, 2012 12:03
Fixing your skip links. [JS]

Fixing your skip links.

Read Damon Muma on this. He proposes the following jQuery solution (inspired by Thompson, fixed by me):

// Apply focus properly when accessing internal links with keyboard in WebKit browsers.
$("a[href^='#']").not("a[href='#']").click(function() {
   $("#"+$(this).attr("href").slice(1)+"").focus();
});
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 17, 2025 12:09 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@luetkemj
luetkemj / wp-query-ref.php
Last active April 6, 2025 09:15
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@jeffsebring
jeffsebring / local-config.php
Created April 2, 2012 03:25
WordPress Pro Config
<?php
# Turn on Caching
#define('WP_CACHE', true);
# Set the Memory Limit
#define('WP_MEMORY_LIMIT', '64M');
# Development Table prefix
#$table_prefix = 'dev_';
@iamntz
iamntz / select.php
Created April 9, 2012 12:02
country selector for wp-contact form 7
<?php
/**
** A base module for [select] and [select*]
**/
/* Shortcode handler */
wpcf7_add_shortcode( 'select', 'wpcf7_select_shortcode_handler', true );
wpcf7_add_shortcode( 'select*', 'wpcf7_select_shortcode_handler', true );