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 | |
$consumerKey = /*CONSUMER KEY*/; | |
$consumerSecret = /* CONSUMER SECRET*/; | |
$authContext = stream_context_create(array( | |
'http' => array( |
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 is_prime($number) { | |
return !preg_match('/^1?$|^(11+?)\1+$/x', str_repeat('1', $number)); | |
} |
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 todays_item($arr){ | |
$count = count($arr); | |
$number = floor(time() / 86400) % $count; | |
return $arr[$number]; | |
} | |
$arr = array( | |
'One', | |
'Two', | |
'Three' |
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 | |
// Make any text 'excerpty' | |
function excerptify($text, $length = 140){ | |
return trim(substr($text, 0, strpos($text, ' ', $length))) . '...'; | |
} |
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
var animations = { | |
onload: function(callback) { | |
document.readyState === 'interactive' || document.readyState === 'complete' ? callback : document.addEventListener('DOMContentLoaded', callback); | |
}, | |
renderize: function(fps, render) { | |
var fpsInterval, startTime, now, then, elapsed; | |
fpsInterval = 1000 / fps; | |
then = Date.now(); | |
startTime = then; |
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($){ | |
// MathJax highlighting jQuery plugin | |
// Highlights variables that are related to each other | |
// i.e. all variables that are the same and have superscript | |
// Note: Variables that have subscript are treated as a different | |
// variable | |
$.fn.highlighter = function(opts){ | |
// Override defaults | |
opts = $.extend({ | |
color: '#08c', |
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
table { | |
float: left; | |
overflow: hidden; | |
position: relative; | |
width: 100%; | |
z-index: 2; | |
} | |
table tr { | |
-webkit-transition: background-color 0.3s; |
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(a){for(var b,c=document.createTreeWalker(document.querySelector("body"),NodeFilter.SHOW_TEXT,null,!1);b=c.nextNode();)b.nodeValue=a})('gong'); |
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 -o nounset -o pipefail -o errexit | |
cd "$(dirname "$0")/../.." | |
################################################################################ | |
# Master one liner interaction with deploying files | |
# | |
# Build the assets, then add and commit the files to git | |
# Then uploads the current branch to the live site, staging site and to GitLab | |
# |
OlderNewer