This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Place in /wp-content/ */ | |
include('../wp-config.php'); | |
include('../wp-load.php'); | |
global $wpdb; | |
//Settings | |
$type = 0; //1 for post, everything else for pages | |
$category_id = 1; // ID of the category, or... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_gaq.push(['_trackEvent', thisel.parents('[id!=""]:first').get(0).id, 'clicked', (thisel.text() || thisel.children('img:first').attr('alt'))]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// | |
// This PHP function detects which Browser (+version) and OS a user is running and returns or | |
// print it in a class-friendly format to use in e.g. Body-class | |
// | |
// Use like <?php echo "<body class=\"".OSbodyClass(false)."\">"; ?> | |
// or <body class="<?php OSbodyClass(); ?>"> | |
// | |
// example output for Firefox 3.6.8 running on Windows 7: <body class="windows firefox ff3"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>CSS-grid Generator</title> | |
<meta name="description" content="The easiest way to construct a basic CSS-grid layout. With query-strings!" /> | |
<meta name="author" content="SimonKberg" /> | |
<meta name="viewport" content="width=device-width; initial-scale=1.0" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in *.mov | |
do | |
ffmpeg -i "$f" -s 728x410 -sameq -acodec libmp3lame -aq 0 "../${f%.mov}.mpg" | |
done | |
for f in *.mov | |
do | |
ffmpeg -i "$f" -s 960x540 -sameq -vprofile baseline -acodec copy "../mov2/${f%.mov}.mov" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Access with ?dev=true for debugging | |
$signed_request = isset($_POST['signed_request']) ? $_POST['signed_request'] : false; | |
$debug = isset($_GET['dev']); | |
$secret = 'APP_SECRET'; | |
if(!$signed_request && !$debug) { | |
die('No direct access.'); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get dependencies | |
$ sudo apt-get install php5-sybase freetds-dev php5-dev -y | |
Move to user hoem directory | |
$ cd ~ | |
Get php5 source | |
$ apt-get source php5 | |
Move into the source code directory (substitute x.x with apropritate version number) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CONCAT('ALTER TABLE ',table_schema,'.',table_name,' ENGINE=InnoDB;') | |
FROM information_schema.tables | |
WHERE 1=1 | |
AND engine <> 'MyISAM' | |
AND table_schema NOT IN ('information_schema', 'mysql', 'performance_schema'); | |
SELECT CONCAT('ALTER TABLE ',table_schema,'.',table_name,' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') | |
FROM information_schema.tables | |
WHERE 1=1 | |
AND collate <> 'utf8_general_ci'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: inc/class-tracking.php | |
=================================================================== | |
--- inc/class-tracking.php (revision 734869) | |
+++ inc/class-tracking.php (working copy) | |
@@ -110,7 +110,7 @@ | |
'name' => get_bloginfo( 'name' ), | |
'version' => get_bloginfo( 'version' ), | |
'multisite' => is_multisite(), | |
- 'users' => $wpdb->get_var( "SELECT COUNT(*) FROM wp_users INNER JOIN wp_usermeta ON (wp_users.ID = wp_usermeta.user_id) WHERE 1 = 1 AND ( wp_usermeta.meta_key = 'wp_{$blog_id}_capabilities' ) " ), | |
+ 'users' => $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->users AS u INNER JOIN $wpdb->usermeta AS m ON (u.ID = m.user_id) WHERE 1 = 1 AND ( m.meta_key = 'wp_{$blog_id}_capabilities' ) " ), |
OlderNewer