Skip to content

Instantly share code, notes, and snippets.


Daniel Brinneman danielbrinneman

View GitHub Profile
danielbrinneman / plugin.php
Created Aug 27, 2020 — forked from kovshenin/plugin.php
Settings API Demo
View plugin.php
* Plugin Name: My Plugin
* Plugin Description: Settings API Demo
add_action( 'admin_menu', 'my_admin_menu' );
function my_admin_menu() {
add_options_page( 'My Plugin', 'My Plugin', 'manage_options', 'my-plugin', 'my_options_page' );
danielbrinneman / gist:e0e90a3fd18eb42d9e35581210a9490d
Last active Sep 25, 2018
Jekyll Codeship Rakefile GitHub Pages
View gist:e0e90a3fd18eb42d9e35581210a9490d
system rake generate
system rake publish
require 'tmpdir'
desc "Generate jekyll site"
task :generate do
puts "## Install bundles"
system "bundle install"
puts "## Generating Site with Jekyll"
system "bundle exec jekyll build --incremental"
puts "## Jekyll Webmention"
View bookmark-this-page.html
<a href="javascript:if(document.all)window.external.AddFavorite(location.href,document.title); else if(window.sidebar)window.sidebar.addPanel (document.title,location.href,'');">Bookmark this page</a>
danielbrinneman / sortable-table.html
Last active May 4, 2017
I created this to replicate the staff list on a website but only use one page and add one more column for the department that would have a non-sortable table followed by a sortable table.
View sortable-table.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Directory Table</title>
<script src=""></script>
<script type="text/javascript" src="//"></script>
View Mobile Responsive Images - WordPress -
/* Place DIV around both images to target the two inside */
<div class=“tbp-images”>
<p><a…<img… </a></p>
<p><a…<img… </a></p>
View Custom Post Type and Taxonomies
Custom Post Type
function create_post_type_reservations() {
register_post_type( 'reservations', array(
'labels' =&gt; array(
'name' =&gt; __( 'Reservations' ),
'singular_name' =&gt; __( 'Reservation' ),
danielbrinneman / index.html
Last active Oct 30, 2017
PayPal Form and jQuery
View index.html
** Please credit me when using this jQuery code -
** jQuery code from scratch by Daniel Brinneman - Copyright Aug 11-15, 2012 -
<!DOCTYPE html />
<script src=""></script>
<meta charset="UTF-8" />