- Save script to e.g.
/usr/local/bin/media-query-combiner
chmod +x /usr/local/bin/media-query-combiner
Reads from stdin
and writes to stdout
.
<?php | |
namespace Renoir\Util; | |
// Specific | |
use \DateTime; | |
use \DateInterval; | |
/** | |
* Time helper utility |
<?php | |
define("_", 0); | |
class Currying{ | |
private $arg1; | |
public function __construct($arg1){ | |
$this->func_a[0] = $arg1; |
<?php | |
$local_file = 'assets/info_system/rss_feeds/feed.xml'; | |
$result = file_get_contents($local_file); | |
$xml = simplexml_load_string($result); | |
$xml->registerXPathNamespace('yweather', 'http://xml.weather.yahoo.com/ns/rss/1.0'); | |
$location = $xml->channel->xpath('yweather:location'); | |
if(!empty($location)) { |
<?php | |
Class Tweets extends ArrayObject { | |
public function __construct( Array $tweets ) { | |
foreach($tweets as $key => $tweet) { | |
$this->offsetSet($key, $this->createTweet($tweet)); | |
} | |
} |
<?php | |
class Bytes | |
{ | |
private $sizeInBytes; | |
private static $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); | |
public function __construct($sizeInBytes) | |
{ | |
$this->sizeInBytes = floatval($sizeInBytes); |
<?php | |
/** | |
* Parser class content | |
* @author Vasinsky Igor | |
* @email igor.vasinsky@gmail.com | |
* @copyright 2013 | |
*/ | |
class Parser{ | |
/** |
<?php | |
/** | |
* getBrowser | |
* | |
* @param void | |
* @return string | |
*/ | |
function getBrowser() | |
{ | |
$browser = array( |
<?php | |
function _scripturebooks() { | |
return array("Genesis", "Exodus", "Leviticus", "Numbers", "Deuteronomy", "Joshua", "Judges", "Ruth", "1 Samuel", "2 Samuel", "1 Kings", "2 Kings", "1 Chronicles", "2 Chronicles", "Ezra", "Nehemiah", "Esther", "Job", "Psalm", "Proverbs", "Ecclesiastes", "Song of Solomon", "Isaiah", "Jeremiah", "Lamentations", "Ezekiel", "Daniel", "Hosea", "Joel", "Amos", "Obadiah", "Jonah", "Micah", "Nahum", "Habakkuk", "Zephaniah", "Haggai", "Zechariah", "Malachi", "Matthew", "Mark", "Luke", "John", "Acts", "Romans", "1 Corinthians", "2 Corinthians", "Galatians", "Ephesians", "Philippians", "Colossians", "1 Thessalonians", "2 Thessalonians", "1 Timothy", "2 Timothy", "Titus", "Philemon", "Hebrews", "James", "1 Peter", "2 Peter", "1 John", "2 John", "3 John", "Jude", "Revelation"); | |
} | |
function scripturesort($a, $b) { | |
if ($a == $b) {return 0;} | |
$order=_scripturebooks(); |
#!/usr/bin/env python | |
""" | |
organize-photos.py - Organize an unstructured folder tree of photos and movie | |
files into a month-and-year folder structure. | |
Note: This is a minor rewrite of @cliss's extension [1,2] of @drdrang's | |
photo management scripts [3], and includes a tweak from @jamiepinkham [4,5]. | |
The lists of raw [6] and video [7] file extensions were found elsewhere. |