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
tell application "Finder" | |
-- get desktop dimensions (dw = desktop width; dh = desktop height) | |
set db to bounds of window of desktop | |
set {dw, dh} to {item 3 of db, item 4 of db} | |
end tell | |
tell application "System Events" | |
repeat with proc in application processes | |
tell proc | |
repeat with win in windows |
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
package com.bigandroidbbq.big_bbq_app.dataLists; | |
public class ListPeople { | |
} |
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
rds-modify-db-parameter-group {param-group-name} \ | |
--parameters="name=character_set_server, value=utf8, method=pending-reboot" \ | |
--parameters="name=collation_server, value=utf8_general_ci, method=pending-reboot" \ | |
--parameters="name=tmp_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \ | |
--parameters="name=max_heap_table_size, value={DBInstanceClassMemory/16}, method=pending-reboot" \ | |
--parameters="name=query_cache_type, value=1, method=pending-reboot" \ | |
--parameters="name=query_cache_size, value={DBInstanceClassMemory/32}, method=pending-reboot" \ | |
--parameters="name=table_open_cache, value=2500, method=pending-reboot" \ | |
--parameters="name=join_buffer_size, value={DBInstanceClassMemory/64}, method=pending-reboot" \ | |
--parameters="name=thread_cache_size, value={DBInstanceClassMemory/12582880}, method=pending-reboot" \ |
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 | |
$message = array( | |
'action' => 750, // IntentService Action to be called on the device. | |
'priority' => 3, // Priority of action called, this would queue the request until later | |
'input' => 3445 // Control aspect. This could be a 'message' id from the server, or the ID of the blog that was published to fire off the C2DM message. | |
); | |
?> |
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 | |
/* | |
Extracts URLs from post content, stores in post_meta in imploded array | |
RegEX help from: http://ask.amoeba.co.in/regular-expression-in-php-extract-link-text-href/ | |
*/ | |
add_action('save_post','extract_urls'); | |
function extract_urls($post_id){ | |
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 | |
/* | |
class.C2DMParallel.php | |
PHP Class to send single messages to multiple devices | |
using Google's C2DM service. | |
*/ | |
class C2DMParallel{ |
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
/* | |
Extracts URLs from post content, stores in post_meta in imploded array | |
RegEX help from: http://ask.amoeba.co.in/regular-expression-in-php-extract-link-text-href/ | |
*/ | |
add_action('save_post','extract_urls'); | |
function extract_urls($post_id){ | |
if ( !wp_is_post_revision( $post_id ) ) { |
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 | |
$url = "https://accounts.google.com/o/oauth2/token"; | |
$fields = array( | |
'grant_type' => 'refresh_token', | |
'client_id' => 'CLIENT_ID', | |
'client_secret' => 'CLIENT_SECRET', | |
'refresh_token' => 'REFRESH_TOKEN' | |
); | |
$ch = curl_init(); |
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 | |
global $wpdb; | |
$meta_key = ''; // Enter your meta key | |
$querystr = "SELECT $wpdb->posts.ID | |
FROM $wpdb->posts | |
WHERE $wpdb->posts.post_status = 'publish' | |
AND $wpdb->posts.post_type = 'post' | |
AND $wpdb->posts.ID NOT IN ( |