This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unction gdrive_shortcode( $atts, $content = null ) { | |
// options for different kinds of embeds, default is folder view | |
extract( shortcode_atts( array( "what" => "folder"), $atts)); | |
switch ($what) { | |
case 'folder': | |
return '<iframe src="https://drive.google.com/embeddedfolderview?id=' . $content . '#list" frameborder="0" width="100%" height="500px" scrolling="auto"> </iframe>'; | |
break; | |
case 'somethingelse': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ol> | |
<?php | |
// This will back create the response counts and generate some random visit counts | |
// for a Daily blank site. Insert into the magic spot of page-debug.php, go to /debug on your | |
// site, let it do its work, then remove. | |
$args = array( | |
'posts_per_page' => -1, | |
'post_type' => 'post', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// I used this when testing the twitter fetching, | |
// it will give you sense of what tweets will be fetched | |
// for a Daily blank site. Insert into the magic spot of page-debug.php, go to /debug on your | |
// site, let it do its work, then remove. | |
$tweets = getTweets( dailyblank_option('twitteraccount'), 200, array('exclude_replies'=>false, 'trim_user' => false ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +cogdog is my blockchain ID. https://onename.com/cogdog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----- change content on output as needed ----- */ | |
function stripFirstLine( $text ) { | |
// removes first line of text from string | |
// ----- h/t http://stackoverflow.com/a/7740485/2418186 | |
return substr( $text, strpos($text, "\n")+1 ); | |
} | |
add_filter( 'the_content', 'cc_cert_content_filter', 20 ); | |
function cc_cert_content_filter( $content ) { | |
if ( is_page_template( 'page-cert.php' ) ) { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Random Arganee</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href='https://fonts.googleapis.com/css?family=Raleway:600,900' rel='stylesheet' type='text/css'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<div id="content" class="clearfix row"> | |
<div id="main" class="col col-lg-12 clearfix" role="main"> | |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> | |
<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----- shortcode to time buddy widget -------- */ | |
add_shortcode("timebuddy", "do_timebuddy"); | |
function do_timebuddy ( $atts ) { | |
// generate a Timebuddy widget because WP strips script tags | |
extract( shortcode_atts( array( "params" => ""), $atts ) ); | |
if ( empty( $params ) ) { | |
return "Missing parameter! set <code>params=\"xxxxx\" from the Timebuddy generated embed code for <code>src=\"</code> e.g. <code>params=\"h=2643743&md=2/24/2017&mt=19.50&ml=1.00&sts=0&sln=0&wt=ew-ltc\"</code> after the \"?\""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
# script to download pile of flickr images from a set and make a movie like the pummelvision service | |
# modified from https://gist.github.com/troutcolor/a6a82ceeb0dafc5f2c32edb09dfe11ac | |
# example https://www.youtube.com/watch?v=KOJC5Xco5NM | |
# needs ffmpeg | |
# needs sips so a mac John says | |
# Fill in the param any except the APIKEY can be empty | |
APIKEY='YOURKEY' |
OlderNewer