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
{ | |
"id":739, | |
"name":"Bulk Week", | |
"number":149, | |
"description":"ewoweihfweih", | |
"state":"preview", | |
"hidden":0, | |
"nsfw":0, | |
"created_at":"2015-06-24 19:05:52", | |
"updated_at":"2015-06-26 01:19:19", |
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(){ | |
/** | |
* Push the local data up to the server. | |
* @param {[type]} episode [description] | |
* @return {[type]} [description] | |
*/ | |
function push(episode) { | |
console.log('push: episode %o', episode); | |
} |
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
/** | |
* | |
* An unusual proposition here. | |
* | |
* Using node to make a tiny console utility | |
* to parse my content specifically. | |
* | |
* q: ~~~ | |
* + correct ~~~ | |
* - wrong ~~~ |
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
ssh_header() { | |
echo "| -------------------" | |
echo "| SSH " | |
echo "| -------------------" | |
} | |
sshr() { | |
ssh_header; | |
echo "| ssh for remote home server" |
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
class Rational(n: Int, d:Int) { | |
require(d != 0) | |
private val g = gcd(n.abs, d.abs) | |
val numerator: Int = n/g | |
val denomerator: Int = d/g | |
def this(n: Int) = this(n, 1) |
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
{ | |
"name":"ryan", | |
"number":"293", | |
"series":"5", | |
"state":"", | |
"hidden":"true", | |
"nsfw":"false", | |
"created_at":"2015-06-01 02:00:03", | |
"updated_at":"2015-06-01 02:00:03", | |
"content":"ifhoiefnoiwefoiwef", |
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 | |
$ids = [39, 13, 17, 24]; | |
$data = []; | |
foreach ($ids as $key => $id) { | |
$data[$id] = ['role' => 'host']; | |
} | |
// expected: [39 => ['role' => 'host'], 13 => ['role' => 'host'], 17 => ['role' => 'host'], 24 => ['role' => 'host']] |
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 | |
$url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20woeid%3D12781740&format=json&diagnostics=true&callback="; | |
// $url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20text%3D%22Macalester%20-%20Groveland%2C%20MN%22&format=json&diagnostics=true&callback="; | |
// $url = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20geo.places%20where%20woeid%3D29306623&format=json&diagnostics=true&callback="; | |
$text = file_get_contents($url); | |
$data = json_decode($text, true); | |
function get_location($data) { |