This file contains hidden or 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 | |
# | |
# = Mongo Collection Stats Script | |
database=${1:-test} | |
mongo --quiet --eval ' | |
var collections = db.getCollectionNames(); | |
print("Collection Count Size StorageSize AvgObjSize nIndexes"); |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# | |
# = Email Ping | |
# | |
# Check to see if an email address exists by looking up MX records and connecting | |
# to the address's home SMTP server. It then starts to send a message to the address | |
# but quits before the message is actually sent. | |
require 'resolv' | |
require 'net/smtp' |
This file contains hidden or 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 | |
function dm_library_document_set_file_size($pieces, $is_new_item) { | |
$size_val = $pieces['fields']['size']['value']; | |
if (!$size_val) { | |
$attachment = $pieces['fields']['attachment']['value']; | |
$attachment_id = reset($attachment); | |
if ($attachment_id) { | |
$attachment_id = $attachment_id['id']; | |
$file_path = get_attached_file($attachment_id); | |
$file_size = filesize($file_path) / 1024; // get size in kilobytes |
This file contains hidden or 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
#= Main Puppet Manifest | |
# Update Apt Repo | |
exec {"update-apt": | |
command => "apt-get update", | |
cwd => "/", | |
path => ["/usr/bin", "/usr/local/bin", "/bin", "/usr/local/sbin", "/usr/sbin", "/sbin"], | |
} | |
# Install cURL |
This file contains hidden or 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
<p> | |
<?php | |
$tags = get_author_tags(get_the_author_meta('ID')); | |
$links = array(); | |
foreach ($tags as $id => $tag) { | |
$url = get_tag_link($tag->term_id); | |
$links[] = "<a href=\"{$url}\">{$tag->name}</a>"; | |
} | |
?> | |
My Topics: <?php echo implode(', ', $links); ?> |
This file contains hidden or 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
\<br\s*\/?\> | |
preg_replace("/\<br\s*\/?\>/", " ", $str); |
This file contains hidden or 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
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so | |
xdebug.remote_enable=true | |
xdebug.remote_connect_back=true | |
xdebug.remote_port=9000 | |
xdebug.remote_handler=dbgp | |
xdebug.profiler_enable=0 |
This file contains hidden or 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
require 'rubygems' | |
require 'sinatra' | |
require 'nokogiri' | |
require 'digest' | |
require 'net/http' | |
require 'cgi' | |
configure do | |
set :config, YAML.load_file(File.join(File.dirname(__FILE__), 'config.yml')) | |
set :api_key, settings.config['api_key'] |
This file contains hidden or 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
<pod title='Result' | |
scanner='Identity' | |
id='Result' | |
position='200' | |
error='false' | |
numsubpods='1' | |
primary='true'> | |
<subpod title='' | |
primary='true'> | |
<plaintext>3.725×10^17 inches</plaintext> |