Skip to content

Instantly share code, notes, and snippets.

View robertcedwards's full-sized avatar
🖼️
Framing

Robert C Edwards robertcedwards

🖼️
Framing
View GitHub Profile
@robertcedwards
robertcedwards / php git pull
Created May 5, 2011 15:56
Git pull backticks in php
<?php `git pull`;?>
@robertcedwards
robertcedwards / jquerylinkremove
Created November 27, 2011 17:37
Jquery remove href from class nolink
$j('.nolink > a').removeAttr('href');
@robertcedwards
robertcedwards / dabblet.css
Created December 30, 2011 17:23
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
@robertcedwards
robertcedwards / wordpresslogin
Created January 17, 2012 19:07
Custom Logo for Wordpress login screen
function login_logo() {echo '<style type="text/css">h1 a { height:100%; background-image:url('.get_bloginfo('template_directory').'/images/logo.png)!important;}</style>';}
add_action('login_head', 'login_logo');
@robertcedwards
robertcedwards / gist:1687524
Created January 27, 2012 06:51
Wordpress wp_enqueue_script usage with jquery and CDNJS
// Load jQuery & NinjaUI
if ( !function_exists(core_mods) ) {
function core_mods() {
if ( !is_admin() ) {
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://code.jquery.com/jquery-latest.min.js"), false);
wp_enqueue_script('jquery');
wp_register_script('ninjaui', ("http://cdnjs.cloudflare.com/ajax/libs/ninjaui/1.0.1/jquery.ninjaui.min.js"), false);
wp_enqueue_script('ninjaui');
}
@robertcedwards
robertcedwards / css3button
Created January 28, 2012 21:20
CSS 3 Button
.button {
padding:.2em;
text-decoration:none;
background-color: #4DBEFA;
-moz-border-radius: 100px;
-webkit-border-radius: 100px;
border-radius: 100px;
-moz-box-shadow: -13px 10px 22px rgba(0,0,0,1);
-webkit-box-shadow: -13px 10px 22px rgba(0,0,0,1);
box-shadow: -13px 10px 22px rgba(0,0,0,1);
@robertcedwards
robertcedwards / gist:1700259
Created January 29, 2012 19:27
sisyphus example
$('form').sisyphus({timeout: 5});
@robertcedwards
robertcedwards / gist:1777319
Created February 9, 2012 04:33
Wordpress Permalink code for .htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
@robertcedwards
robertcedwards / protectyoneck
Created February 15, 2012 19:34
.htaccess protect wordpress wp-config.php
# protect wpconfig.php
<files wp-config.php>
order allow,deny
deny from all
</files>
@robertcedwards
robertcedwards / protectmyneck
Created February 15, 2012 19:43
Using php environment variables to protect our settings from the public…
$pass = getenv('DB_PASSWORD');
$user = getenv('DB_USER' );
define('DB_PASSWORD', $pass);
define('DB_USER',$user);