Skip to content

Instantly share code, notes, and snippets.

View n8finch's full-sized avatar

Nate Finch n8finch

View GitHub Profile
@eiskalteschatten
eiskalteschatten / update-wordpress.sh
Created October 2, 2016 12:37
Update WordPress with a Bash script using WP CLI
#!/bin/bash
function updateWordPress {
cd $1
wp core update
wait
wp plugin update --all
wait
wp theme update --all
wait
@studiopress
studiopress / functions.php
Last active May 23, 2017 07:17
Load Google Fonts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Enqueue Lato Google font
add_action( 'wp_enqueue_scripts', 'sp_load_google_fonts' );
function sp_load_google_fonts() {
wp_enqueue_style( 'google-font-lato', '//fonts.googleapis.com/css?family=Lato:300,700', array(), CHILD_THEME_VERSION );
}
@studiopress
studiopress / home-1.html
Last active December 18, 2017 05:53
Centric Pro Theme Code
<h1>Be the Center of Attention and Demand Focus</h1>
Stopping eyeballs in their tracks is not easy. You need a design that demands focus, a story that generates impulse, and they must integrate seamlessly. Centric, built on HTML5 and mobile responsive, gives you all of it. So what do you want to do online? Sky's the limit.
@norcross
norcross / content-create.php
Last active February 20, 2018 16:50
Functionality pieces for the NextDraft build
<?php
/**
* AJAX call for parsing HTML
*
*/
public function parse_html() {
// get content from textarea
$text = $_POST['content'];
/*
Meteor allows you to store functions on the server for handling things like data.
This is the server-side component to the Meteor.call() example in add-taco.js.
*/
Meteor.methods({
// Define our method. Note, we're passing an argument for the tacoToInsert value we passed to our Meteor.call() method.
'addTaco': function(tacoName){
// Here we do our insert again.
Tacos.insert({
@justincarroll
justincarroll / bootstrap-masonry-template.htm
Last active August 15, 2020 16:48
This is my template for using Masonry 3 with Bootstrap 3. For those of you who follow this gist a lot has changed since Bootstrap 2.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">
.yoast-settings {
display: none;
}
@studiopress
studiopress / color-button.css
Last active January 31, 2021 13:48
Colored Content Boxes
/* Color Buttons
------------------------------------------------------------ */
.button-blue,
.button-gray,
.button-green,
.button-purple,
.button-red,
.button-yellow {
color: #fff;
<?php
// Version CSS file in a theme
wp_enqueue_style(
'theme-styles',
get_stylesheet_directory_uri() . '/style.css',
array(),
filemtime( get_stylesheet_directory() . '/style.css' )
);
#!/bin/bash
wp core download --version=4.5
wp core config --dbname=$1 --dbuser=root --dbhost=127.0.0.1
wp db create
wp core install --skip-email --title="$1" --admin_user="shawn" --admin_password="shawn" --admin_email=shawn@actionable.co --url=http://wcroc.dev/
wp theme install simone --activate
wp plugin delete hello
wp plugin install any-ipsum;
wp plugin install advanced-custom-fields --version=4.4.0 --activate
wp plugin install tinymce-advanced --activate