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
DROP TABLE IF EXISTS time_dimension; | |
CREATE TABLE time_dimension ( | |
id INTEGER PRIMARY KEY, -- year*10000+month*100+day | |
db_date DATE NOT NULL, | |
year INTEGER NOT NULL, | |
month INTEGER NOT NULL, -- 1 to 12 | |
day INTEGER NOT NULL, -- 1 to 31 | |
quarter INTEGER NOT NULL, -- 1 to 4 | |
week INTEGER NOT NULL, -- 1 to 52/53 | |
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'... |
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() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] | |
|| window[vendors[x]+'CancelRequestAnimationFrame']; | |
} | |
if (!window.requestAnimationFrame) | |
window.requestAnimationFrame = function(callback, element) { |
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
/* ========================================================= | |
* My way to safely display external pictures | |
* ========================================================= | |
* Copyright 2015 Leonan Carvalho @leonancarvalho | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
$proxy = (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : false; | |
$hostname = ""; | |
if (!!$proxy) { | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
$hostname .= "Proxy: "; | |
} else { | |
$ipaddress = $_SERVER['REMOTE_ADDR']; // | |
} | |
if ($ipaddress == $hostname) { | |
$hostname .= "Unknown"; |
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 | |
/* ========================================================= | |
* Script to Generate MySQL dumps With PHP | |
* ========================================================= | |
* Copyright 2015 Leonan Carvalho @leonancarvalho | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
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 | |
/** | |
* Description of ResultSet: | |
* This class handler a paginated Cassandra\FutureRows | |
* | |
* @author Leonan Carvalho | |
*/ | |
class ResultSet { |
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
import java.io.BufferedReader; | |
import java.io.DataOutputStream; | |
import java.io.InputStreamReader; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import javax.servlet.http.HttpServletRequest; | |
//... |
This file has been truncated, but you can view the full file.
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
Downloading/unpacking argparse==1.4.0 (from -r default/src/ckan/requirements.txt (line 7)) | |
Getting page https://pypi.python.org/simple/argparse/ | |
URLs to search for versions for argparse==1.4.0 (from -r default/src/ckan/requirements.txt (line 7)): | |
* https://pypi.python.org/simple/argparse/1.4.0 | |
* https://pypi.python.org/simple/argparse/ | |
Getting page https://pypi.python.org/simple/argparse/1.4.0 | |
Could not fetch URL https://pypi.python.org/simple/argparse/1.4.0: HTTP Error 404: Not Found | |
Will skip URL https://pypi.python.org/simple/argparse/1.4.0 when looking for download links for argparse==1.4.0 (from -r default/src/ckan/requirements.txt (line 7)) | |
Analyzing links from page https://pypi.python.org/simple/argparse/ |
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
# CKAN lighttpd vhost | |
# server.modules += ( "mod_proxy" ) | |
$HTTP["host"] == "ckan.example.com"{ | |
proxy.server = ( "" => | |
( "" => | |
("host" => "127.0.0.1", "port" => 5000) | |
) | |
) | |
} |
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": "df72dc57-1eb9-42a3-88a9-8647ecc954b4", | |
"type": "GenericEntity", | |
"dateCreated": { | |
"value": "2017-02-10T19:20+10:03", | |
"type": "DateTime" | |
}, | |
"dateModified": { | |
"value": "2017-02-15T22:02+01:51", | |
"type": "DateTime" |
OlderNewer