Skip to content

Instantly share code, notes, and snippets.

Jan Beck jancbeck

  • Germany
Block or report user

Report or block jancbeck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jancbeck / kirbytext.extended.php
Last active Aug 29, 2015 — forked from tysongach/kirbytext.extended.php
A Kirbytext extension that lets you add HTML5 figure tags for videos and images.
View kirbytext.extended.php
class kirbytextExtended extends kirbytext {
function __construct($text=false, $markdown=true, $smartypants=true) {
parent::__construct($text, $markdown, $smartypants);
// define custom tags
* Move this file to /site/snippets/ and rename it video.php
// stop without videos
if(empty($videos)) return;
// set some defaults
jancbeck / acf_register_fields.php
Last active Aug 29, 2015
How to search for the title of a related custom post type in the WordPress admin using ACF Pro
View acf_register_fields.php
<?php if( function_exists('acf_add_local_field_group') ):
acf_add_local_field_group(array (
'key' => 'group_558c7f75de508',
'title' => 'Stories',
'fields' => array (
array (
'key' => 'field_558c7fe4df0bc',
'label' => 'Select artist',
'name' => 'select_artist',
jancbeck / huffduffit.js
Last active Aug 29, 2015
Huffduffer iOS Bookmarklet. The official bookmarklet by @adactio uses to send users to the "Huffduff it" page that is suppressed in iOS. This script provides an alternative by redirecting the user instead via window.location.
View huffduffit.js
jancbeck / query_google_spreadsheets.php
Last active Dec 12, 2015
This function takes a (public) spreadsheet key and optionally sheet name and returns a clean 2-dimensional array of the table. Had to use CURL for my projects. You may use file_get_contents or fopen.
View query_google_spreadsheets.php
function query_google_spreadsheets( $key, $query, $sheet_name = '' ) {
// queries a spreadsheet url and returns a clean array
$sheet_url = ''. $key .'&tq='. $query .'&sheet='. $sheet_name;
$str = file_get_contents( $sheet_url );
// clean json string
$str = str_replace( "// Data table response\ngoogle.visualization.Query.setResponse(", '', $str );
$str = rtrim( $str, ');' );
jancbeck / html
Created Mar 2, 2013
Starting Template for HTML files
View html
<!doctype html>
<html class="no-js">
<meta charset="utf-8" />
<script>(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement) /* removes no-js class */</script>
<title>Untitled Document</title>
jancbeck / highlight.php
Created Oct 30, 2014
Code Highlight Plugin for Kirby CMS v2
View highlight.php
kirbytext::$pre[] = function($kirbytext, $value) {
return preg_replace_callback('!```(.*?)```!is', function($code){
$code = @$code[1];
$lines = explode("\n", $code);
jancbeck /
Last active Jun 4, 2016
Fetches themes from and feeds them into a Google Spreadsheet
* Step 1: Execute `buildThemeList` to build the basic list of all themes.
* Step 2: Enter your Page Speed Insights API Key
* Step 3: Create minutely trigger for `getPageSpeeds`.
var apiKey = 'YOUR API KEY';
var deleteOldSheets = true;
jancbeck / woocommerce-optimize-scripts.php
Last active Jun 8, 2016 — forked from DevinWalker/woocommerce-optimize-scripts.php
Only load WooCommerce scripts on shop pages and checkout + cart
View woocommerce-optimize-scripts.php
<?php add_action( 'wp_enqueue_scripts', function() {
if ( function_exists( 'is_woocommerce' ) && ! is_woocommerce() && ! is_cart() && ! is_checkout() ) {
wp_dequeue_style( 'woocommerce_frontend_styles' );
wp_dequeue_style( 'woocommerce_fancybox_styles' );
wp_dequeue_style( 'woocommerce_chosen_styles' );
wp_dequeue_style( 'woocommerce_prettyPhoto_css' );
wp_dequeue_script( 'wc_price_slider' );
wp_dequeue_script( 'wc-single-product' );
wp_dequeue_script( 'wc-add-to-cart' );

Keybase proof

I hereby claim:

  • I am jancbeck on github.
  • I am jancbeck ( on keybase.
  • I have a public key ASBC8CHbwPT11Jz5cP_InKjVuD8YZTxpWsJGqPTkiBWy6go

To claim this, I am signing this object:

You can’t perform that action at this time.