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 FacebookDebugger | |
{ | |
/* | |
* https://developers.facebook.com/docs/opengraph/using-objects | |
* | |
* Updating Objects | |
* | |
* When an action is published, or a Like button pointing to the object clicked, | |
* Facebook will 'scrape' the HTML page of the object and read the meta tags. |
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 -i | grep 'Configure Command =>' | awk '{for(i=5; i<=NF; i++) {print substr($i, 2, (length($i) - 2))}}' |
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
/* | |
# Print Map | |
Usage: | |
// option 1 | |
.debug { | |
@include print-map($map); | |
} |
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 | |
/** | |
* @file | |
* Definition of the 'bootstrap_style' panels style plugin. | |
*/ | |
$plugin = array( | |
'title' => t('Example Parent Style'), | |
'description' => t('Example style providing substyles'), |
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
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
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
### Apache Rewrite | |
# Request resides in your 'sites/default/files' folder. | |
RewriteCond %{REQUEST_URI} ^/sites/default/files/(.*)$ | |
# File doesn't exist. | |
RewriteCond %{REQUEST_FILENAME} !-f | |
# Directory doesn't exist. | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# Redirect request to your development or production server. | |
RewriteRule ^/sites/default/files/(.*)$ http://dev.example.com/sites/default/files/$1 [L] |
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
### | |
# BEGIN MOBILE REDIRECTS | |
### | |
# If the skipMobileDetection cookie is set, and we're on the mobile domain, | |
# return to the normal domain. Do this only for SSL as Varnish will handle | |
# for port 80. | |
RewriteCond %{HTTP_COOKIE} skipmobiledetection [NC] | |
RewriteCond %{HTTP_HOST} ^m\. [NC] | |
RewriteCond %{SERVER_PORT} =443 |
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
# REGULAR VERSION | |
gunzip -c db.sql.gz | grep -Ev "^INSERT INTO \`(cache_|search_|sessions|whatever)" | mysql -u root -p databasename | |
# DRUPAL VERSION | |
gunzip -c db.sql.gz | grep -Ev "^INSERT INTO \`(cache_|search_|sessions|whatever)" | drush sqlc |
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 | |
// current table prefix to be removed | |
$prefix = "drup_"; | |
// echo generated statments rather then run them | |
$pretend = FALSE; | |
///////////////////////////////////////////////////////////////////// | |
$table_list = db_query("SHOW TABLES"); |
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 the following to fix this error. | |
ttidwell@a:~:->$ sudo lsof|grep 9000 | |
sshd 31533 ttidwell 9u IPv6 506614 0t0 TCP [::1]:9000 (LISTEN) | |
sshd 31533 ttidwell 10u IPv4 506615 0t0 TCP localhost:9000 (LISTEN) | |
ttidwell@a:~:->$ kill 31533 |