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
<pre><?php | |
require 'wp-load.php'; | |
$postmeta_field_name = 'video_url'; // fill it | |
echo $query = "SELECT * FROM {$wpdb->postmeta} WHERE meta_key = '$postmeta_field_name';"; | |
$data = $wpdb->get_results( $query ); |
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
/** | |
* Function to remove wpautop filter for specific post IDs | |
*/ | |
add_action( 'init', 'do_ma_thang' ); | |
function do_ma_thang() { | |
global $wp_query; | |
$exclusion = array( 1, 5, 7 ); // add post IDs here |
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 | |
/** | |
* SugarCRM RESTS API Call examples | |
* | |
* REST API Wrapper - https://github.com/asakusuma/SugarCRM-REST-API-Wrapper-Class | |
*/ | |
?> | |
<!doctype html> | |
<head> | |
<meta charset="utf-8"> |
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 | |
#Change your db username, password & database name | |
if [ -f ~/Desktop/db_schema.html ]; then | |
rm ~/Desktop/db_schema.html | |
fi | |
for i in `mysql -B -N -uroot -proot dbname -e 'show tables;'`; do | |
echo "<a href='#$i'>$i</a><br />" >> /tmp/$$.nav.html |
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 | |
# By Ashfame | |
while true | |
do | |
# keep checking for idle dropbox status | |
STATUS=`dropbox status` | |
if [ $STATUS = 'Idle' ]; then | |
notify-send "System Shutdown" "System will power off now" |
NewerOlder