Skip to content

Instantly share code, notes, and snippets.

@backflip
backflip / gist:1424004
Created December 2, 2011 17:06
WordPress Shortcodes
<?php
/**
* Enable shortcodes in widgets
*/
add_filter('widget_text', 'do_shortcode');
/**
import Helper from "./Helper";
import HeaderStateHandler from "./HeaderStateHandler";
const defaults = {
toggler: "#js-share-toggler",
share: "#js-header-share",
title: "title",
facebook: "#js-share-facebook",
twitter: "#js-share-twitter",
linkedin: "#js-share-linkedin",
@backflip
backflip / bower.json
Last active August 30, 2019 12:03 — forked from GFoley83/load-google-maps.js
Load Google Maps API using jQuery Deferred
{
"name": "load-google-maps",
"version": "1.0.0",
"main": ["./load-google-maps.js"],
"author": "Glenn Baker & Gavin Foley",
"dependencies": {
"jquery": ">=1.5"
},
"license": ["MIT", "GPL"],
"keywords": ["Google Maps", "Async"]

Keybase proof

I hereby claim:

  • I am backflip on github.
  • I am thomasjaggi (https://keybase.io/thomasjaggi) on keybase.
  • I have a public key ASDEyw1Vx5b2LER2DHbP3w_ErtZm-reb8BiNRRpKoPpYDwo

To claim this, I am signing this object:

@backflip
backflip / bookmarklet.js
Last active April 27, 2018 06:41
Bookmarklet für TG Hütten Monatsprogramm
;(function() {
var options = {
container: '.j-hgrid',
column: '.cc-m-hgrid-column',
cell: '.j-text',
minWidth: '100px'
};
function setHeights(rows) {
rows.forEach(function(row) {
@backflip
backflip / PR.txt
Last active March 2, 2018 11:30
PR checklist
### Summary
*What is happening here?*
*Link to preview*
@backflip
backflip / Gruntfile.js
Created September 17, 2017 17:25
Grunt: Resolve sprockets-like directives in files and concatenate
var fs = require('fs')
var path = require('path')
module.exports = function (grunt) {
grunt.initConfig({
concat: {
dist: {
src: (function (file) {
var fileCache = []
@backflip
backflip / Gruntfile.js
Created September 17, 2017 17:25
Grunt: Resolve sprockets-like directives in files and concatenate
var fs = require('fs')
var path = require('path')
module.exports = function (grunt) {
grunt.initConfig({
concat: {
dist: {
src: (function (file) {
var fileCache = []
(function() {
let total = 0,
issues = [].slice.call(document.querySelectorAll('.ghx-issue-compact .ghx-inner')).map((node) => {
let text = node.innerText,
time = text.match(/ \[(.*)h\]/) || '',
group = text.match(/^(.*?) - (.*?)/) || '',
feedback = text.match(/^\[(Needs feedback)\] /) || '';
if (time) {
text = text.replace(time[0], '');
@backflip
backflip / config.rb
Last active July 11, 2017 14:53
Using Redcarpet and Middleman Syntax for Markdown and HAML files
class CustomMarkdown < Middleman::Extension
$markdown_options = {
autolink: true,
fenced_code_blocks: true,
no_intra_emphasis: true,
strikethrough: true,
tables: true,
hard_wrap: true,
with_toc_data: true
}