Snippets frequently used with Sage
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 | |
function the_date_range($args) { | |
global $post; | |
$default = array( | |
'start_field' => 'start_date', | |
'end_field' => null, | |
'base_format' => 'Ymd', | |
'post_id' => $post->ID, | |
'separator' => '<span class="date-separator">–</span>', | |
'month_format' => 'F', |
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
'use strict'; | |
angular.module('keeniolab', ['ngResource']). | |
factory('KeenIO',function ($resource) { | |
var KeenIO = $resource('https://api.keen.io/3.0/projects/513a76812975164a4a000002/queries/:type', | |
{ | |
api_key: 'api-key', | |
event_collection: 'read', | |
timezone: 7200 | |
}, { | |
update: { method: 'PUT' } |
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 -e | |
clear | |
echo "============================================" | |
echo "WordPress Install Script" | |
echo "============================================" | |
echo "Database Name: " | |
read -e dbname | |
echo "Database User: " | |
read -e dbuser | |
echo "Database Password: " |