A Pen by Captain Anonymous on CodePen.
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 | |
if [ -z $1 ] | |
then | |
echo "Enter commit message" | |
exit 1; | |
fi | |
middleman build | |
git add -A | |
git commit -am "$1" | |
git push |
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
FastCGI caching directives | |
fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=WORDPRESS:30m inactive=30m; | |
fastcgi_cache_key "$scheme$request_method$host$request_uri"; | |
fastcgi_cache_lock on; | |
fastcgi_cache_use_stale error timeout invalid_header http_500; | |
fastcgi_cache_valid 5m; | |
fastcgi_ignore_headers Cache-Control Expires Set-Cookie; | |
server { | |
##DM - uncomment following line for domain mapping |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<div id="tweet"></div> | |
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
function varnish_purge($post_id) | |
{ | |
$hostname = 'localhost'; | |
$port = 80; | |
$URL = get_permalink( $post_id ); | |
$debug = false; | |
// $finalURL = sprintf( | |
// "http://%s:%d%s", $hostname, $port, $URL | |
// ); |
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 | |
if [[ ! "$(/usr/sbin/service mysql status)" =~ "start/running" ]] | |
then | |
/usr/sbin/service mysql start | |
fi |
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
function remove_emoji($text) { | |
$clean_text = ""; | |
// Match Emoticons | |
$regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u'; | |
$clean_text = preg_replace($regexEmoticons, '', $text); | |
// Match Miscellaneous Symbols and Pictographs | |
$regexSymbols = '/[\x{1F300}-\x{1F5FF}]/u'; |
NewerOlder