Skip to content

Instantly share code, notes, and snippets.

View n8finch's full-sized avatar

Nate Finch n8finch

View GitHub Profile
@tomazzaman
tomazzaman / README.md
Last active September 17, 2023 20:59
Gulp workflow for WordPress theme development

Gulp workflow for WordPress theme development

Requirements

In order for Livereload to work, you need a Firefox or Chrome extension as Gulp doesn't inset it automatically. Alternatively, you can also manually put the livereload script in footer.php, just make sure to insert it only on development environment:

<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script>
/*
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({
@jaimergp
jaimergp / config-highlight.cfg
Last active July 28, 2023 14:39
Dark highlighting theme for Python IDLE based on SublimeText's Monokai color scheme
# Place this file inside your ~/.idlerc/ folder
# or paste its contents inside
# /path/to/python/idlelib/config-highlight.def
# Adapted from SublimeText's Monokai
[monokai]
normal-foreground= #F8F8F2
normal-background= #272822
keyword-foreground= #F92672
keyword-background= #272822
@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.
@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 );
}
@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'];
@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;
@joaocunha
joaocunha / How To Hide The Select Arrow On Firefox.md
Last active December 10, 2023 13:05
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
@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">