View gist:ed985e4f367c8d82309cbb298038cddd
SELECT TABLE_NAME, table_rows, data_length, index_length,
round(((data_length + index_length) / 1024 / 1024),2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "something"
ORDER BY round(((data_length + index_length) / 1024 / 1024),2) DESC
LIMIT 0,15;
View gist:6707330b41fdfb6002f48b9fe040ed80
# Allow all loopback (lo0) traffic and reject traffic
# to localhost that does not originate from lo0.
-A INPUT -i lo -j ACCEPT
-A INPUT ! -i lo -s 127.0.0.0/8 -j REJECT
# Allow ping and traceroute.
-A INPUT -p icmp --icmp-type 3 -j ACCEPT
-A INPUT -p icmp --icmp-type 8 -j ACCEPT
-A INPUT -p icmp --icmp-type 11 -j ACCEPT
View gist:3c5e0d413fe9ae8e86dc886fb6ab2a21
KeepAlive Off
<ifmodule mpm_prefork_module="">
StartServers 2
MinSpareServers 6
MaxSpareServers 12
MaxClients 30
MaxRequestsPerChild 3000
</ifmodule>
View gist:c403ad8d8489f0b0c75151ac40553d38
<?php
$trace = debug_backtrace();
header('content-type: text/plain');
print_r($trace);
exit;
///
/**
* Implementation of hook_watchdog().
View gist:24d58cc586ffcb1cc19fd8ee29b7bbff
<?php
$base_url = 'http://localhost/test_endpoint';
$data = array(
'username' => 'admin',
'password' => 'pass',
);
$data = http_build_query($data, '', '&');
$headers = array();
$options = array(
'headers' => array(
View gist:9508b3a74732abd84083d7d4d6e3c42d
<?php
$service_url = 'http://example.dev/rest/user/login.xml';
$post_data = array(
'username' => 'admin',
'password' => 'pass',
);
$post_data = http_build_query($post_data, '', '&');
// set up the request
$curl = curl_init($service_url);
View gist:104cda5ef914ebc0a1348d7a8210c970
<?php
-- CAUTION: DO NOT RUN THIS ON DATABASE WHERE YOU NEED TO KEEP THE DATA!!!
-- Munge emails.
UPDATE users SET mail = CONCAT(name, '@localhost'), init = CONCAT(name, '@localhost'), pass = MD5(CONCAT('MILDSECRET', name));
UPDATE comments SET mail = CONCAT(name, '@localhost');
UPDATE directory SET mail = CONCAT(name, '@localhost');
UPDATE authmap SET authname = CONCAT(aid, '@localhost');
UPDATE client SET mail = CONCAT(cid, '@localhost');
-- Only important if you use project and project_issue module
UPDATE project_issue_projects SET mail_digest = 'foo@localhost', mail_copy = 'foo@localhost';
View gist:cd1e38e17de70550011cd83ea2917d0d
<VirtualHost *:8888>
DocumentRoot "/Users/paul/Sites/example/docroot"
ServerName example.local
ErrorLog "/Users/paul/Sites/example/error_log"
CustomLog "/Users/paul/Sites/example/access_log" common
<IfModule mod_rewrite.c>
RewriteEngine on
# Request resides in your 'sites/default/files' folder.
RewriteCond %{REQUEST_URI} ^/sites/default/files/(.*)$
View gist:c253494e59592cae16d2165697968e52
$conf['file_public_path'] = '/path/to/public/files/directory';
$conf['file_private_path'] = '/path/to/private/files/directory';
$conf['file_temporary_path'] = '/path/to/tmp/directory';
$conf['theme_debug'] = TRUE;
$conf['devel_enable'] = TRUE;
$conf['reroute_email_enable'] = TRUE;
$conf['cache'] = FALSE; //page cache
View gist:0da62d48e60994653d0d09b9b9dd9736
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);