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
#!/usr/bin/python | |
""" | |
jekyll-post - this is a simple script that will create and initialize a new | |
Jekyll post file. The default is a markdown file (.md) and the yaml options | |
listed below will be part of the initialization. | |
jekyll-post [-w] [-d date] [title] | |
title the title of the post wrapped in quotes, e.g. "post title here" |
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> | |
<script> | |
/** | |
* This function used with gratitude from | |
* http://stackoverflow.com/a/34666534/1591507 | |
* I want to refactor this to ES6 so badly but | |
* since it has to reside in the DOM to avoid FOUT, | |
* we can't transpile with Babel unfortunately | |
*/ |
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
<script> | |
// Store and retrieve 1000 100-byte items. Then store and retrieve 10 10000-byte item | |
let test = (numBlocks, byteSze) => { | |
let bytes = 'a'; | |
for (let i = 0; i < byteSze; i++) { | |
bytes += 'a'; | |
} |
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 orderBySubArray( &$array, $new_key = 'order', $order = 'ascending', $start_at = 1 ) | |
{ | |
$output = array(); | |
$count = count( $array ); | |
$i = ( $order == 'ascending' ) ? $start_at : $count; | |
for ( $j = 1; $j <= $count; $j++ ) | |
{ |
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
<div class="toggle"> | |
<a href="#" class="read-more">Read more</a> | |
<div class="hidden hiding" style="display:none">This text toggles back and forth</div> | |
</div> |
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
#include <iostream> | |
using namespace std; | |
bool isInt(char tempNumber); | |
int main() | |
{ | |
char tempNumber[10]; | |
while ( true ) |
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
<div id="slider"> | |
<img> | |
<input type="hidden" value="/wp-content/themes/geek/images/slide1.png"> | |
<input type="hidden" value="/wp-content/themes/geek/images/slide2.png"> | |
<input type="hidden" value="/wp-content/themes/geek/images/slide3.png"> | |
<input type="hidden" value="/wp-content/themes/geek/images/slide4.png"> | |
</div> |
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
function fibonacci(n, recursive) | |
{ | |
if ( n == 0 ) | |
return 0; | |
if ( n < 3 ) | |
return 1; | |
if ( recursive !== true ) | |
n--; | |
return fibonacci( n-1, true) + fibonacci( n-2, true); | |
} |
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
function fibonacci( n ) | |
{ | |
prev_1 = total = 0; | |
prev_2 = 1; | |
if ( n == 0 ) | |
return 0; | |
if ( n < 3 ) | |
return 1; | |
for ( var i = 0; i < n - 1; i++ ) | |
{ |
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 z_get_taxonomy( $var ) | |
{ | |
extract( shortcode_atts( array( | |
'name' => '' | |
), $var ) ); | |
$postID = get_the_ID(); | |
if ( ! empty( $name ) ) | |
{ |