Skip to content

Instantly share code, notes, and snippets.

View roybarber's full-sized avatar

Roy Barber roybarber

View GitHub Profile
@roybarber
roybarber / wp-local-config.php
Created January 27, 2013 16:47
Wordpress Local Settings Template
<?php
// Local server settings
// Local Database
define('DB_NAME', 'client');
define('DB_USER', 'root');
define('DB_PASSWORD', 'root');
define('DB_HOST', 'localhost');
// Overwrites the database to save keep edeting the DB
@roybarber
roybarber / wp-config.php
Created January 27, 2013 16:51
Wordpress Config - Live Server
<?php
// Use these settings on the local server
if ( file_exists( dirname( __FILE__ ) . '/wp-config-local.php' ) ) {
include( dirname( __FILE__ ) . '/wp-config-local.php' );
// Otherwise use the below settings (on live server)
} else {
// Live Server Database Settings
@roybarber
roybarber / .gitignore
Created January 27, 2013 16:52
wordpress .gitignore
# Don't add the Local settings file to the repository #
htdocs/wp-config-local.php
# If using SASS to compile stylesheets this saves conflicts, plus there not needed! #
htdocs/wp-content/themes/YOURTHEME/.sass-cache/*
# No need to add the upgrade folder to the repo #
htdocs/wp-content/upgrade/*
# sitemaps not needed locally #
@roybarber
roybarber / _sprites.scss
Created February 3, 2013 16:12
Gist of to compile sprites via compass/sass
// demo sprite generation - edit core with the name of the folder you wish to use
// This tells compass to also print out the width & height into the css
$core-sprite-dimensions: true;
// Folder and file type to watch
@import "core/*.png";
// Include Sprites ito stylesheet
@include all-core-sprites;
@roybarber
roybarber / sprites.css
Created February 3, 2013 16:15
Output of the _sprites.scss file
.core-sprite, .core-icon-facebook, .core-icon-linkedin, .core-icon-skype, .core-logo { background: url('../img/core-s323b60b8ee.png') no-repeat; }
.core-icon-facebook { background-position: 0 -113px; height: 32px; width: 32px; }
.core-icon-linkedin { background-position: 0 -81px; height: 32px; width: 32px; }
.core-icon-skype { background-position: 0 -49px; height: 32px; width: 32px; }
.core-logo { background-position: 0 0; height: 49px; width: 179px; }
desc "Pull a database dump from remote server, drop the local database, then import the dump"
task :pull_database_to_local do
# Build out temporary file name with timestamp for uniqueness
timestamp = get_timestamp
temp_file_name = "database_dump_#{timestamp}"
remote_file_name = remote_mysqldump(temp_file_name)
download(remote_file_name, "/tmp/#{temp_file_name}.sql.gz")
desc "Pull a database dump from remote server, drop the local database, then import the dump"
task :pull_database_to_local do
# Build out temporary file name with timestamp for uniqueness
timestamp = get_timestamp
temp_file_name = "database_dump_#{timestamp}"
remote_file_name = remote_mysqldump(temp_file_name)
download(remote_file_name, "/tmp/#{temp_file_name}.sql.gz")
@roybarber
roybarber / vertical-align-mixin.scss
Created January 13, 2014 19:15
Vertical Align Anything
@mixin vertical-align {position: relative;top: 50%;-webkit-transform: translateY(-50%);-moz-transform: translateY(-50%);-ms-transform: translateY(-50%);transform: translateY(-50%);}
.element {@include vertical-align;}
@roybarber
roybarber / transform-hack.css
Created January 13, 2014 19:18
Enable hardware acceleration on an animated element by using the “null transform hack”.
.element {-webkit-transform: translateZ(0);-moz-transform: translateZ(0);transform: translateZ(0);}
@roybarber
roybarber / testgist.html
Last active May 1, 2017 10:15
Test Embed Gist
<!--Konto Erstellen-->
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Titel</title>
</head>
<body>
<h1>Platzhalter Nummer 1</h1>