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 | |
// Support for thumbnails on proper media files - activates post thumbnails by default | |
add_post_type_support( 'attachment:audio', 'thumbnail' ); | |
add_post_type_support( 'attachment:video', 'thumbnail' ); | |
add_theme_support( 'post-thumbnails', array( 'post', 'attachment:audio', 'attachment:video' ) ); |
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 | |
/** | |
* GIT DEPLOYMENT SCRIPT | |
* | |
* Used for automatically deploying websites via github, gitlab or bitbucket, more deets here: | |
* | |
* https://gist.github.com/9323683 | |
*/ | |
// The commands |
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
$(window).bind("load resize", function(){ | |
var container_width = $('.facebook-block').width(); | |
$('.facebook-block').html('<div class="fb-like-box" ' + | |
'data-href="https://www.facebook.com/MeraMusik"' + | |
' data-width="' + container_width + '" data-height="300" data-show-faces="true" ' + | |
'data-stream="false" data-header="true" data-show-border="false"></div>'); | |
FB.XFBML.parse( ); | |
}); |
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
#!/bin/bash | |
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
SOURCE="$(readlink "$SOURCE")" | |
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | |
done | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
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
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
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 | |
//... | |
$databases = array (); | |
$databases['default']['default'] = array( | |
'driver' => 'mysql', | |
'database' => getenv('DB_ENV_MYSQL_DATABASE'), | |
'username' => getenv('DB_ENV_MYSQL_USER'), |
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
#!/bin/bash | |
echo PHP version to unlink | |
read PHPUNLINK | |
echo PHP version to link | |
read PHPLINK | |
for i in $( brew list | grep $PHPUNLINK ); do | |
brew unlink $i |
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 options | |
session.save_handler = files | |
session.save_path = /var/lib/php5 | |
session.gc_maxlifetime = 1440 | |
short_open_tag = Off | |
expose_php = Off | |
; hhvm specific | |
hhvm.log.level = Warning |
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 // Use this when you use normal web cron and scheduled posts don't get published | |
define( 'ALTERNATE_WP_CRON', true ); |
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
#!/bin/bash | |
# replace what is in [[ ]] with necessary variables | |
# Database credentials | |
user="[[username]]" | |
password="[[password]]" | |
host="[[host]]" | |
db_name="[[database_name]]" | |
# Other options | |
backup_path="[[path_to_backup_folder]]" |
OlderNewer