⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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 | |
// This file walks you through the most common features of PHP's SQLite3 API. | |
// The code is runnable in its entirety and results in an `analytics.sqlite` file. | |
// Create a new database, if the file doesn't exist and open it for reading/writing. | |
// The extension of the file is arbitrary. | |
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE); | |
// Errors are emitted as warnings by default, enable proper error handling. |
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
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
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
## API Gateway "Send Everything" Mapping Template - Ryan Green - ryang@ryang.ca | |
## See http://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html | |
#set($allParams = $input.params()) | |
{ | |
"body-json" : "$input.json('$')", | |
"params" : { | |
#foreach($type in $allParams.keySet()) | |
#set($params = $allParams.get($type)) | |
"$type" : { | |
#foreach($paramName in $params.keySet()) |
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 | |
/** | |
* CIDR.php | |
* | |
* Utility Functions for IPv4 ip addresses. | |
* Supports PHP 5.3+ (32 & 64 bit) | |
* @author Jonavon Wilcox <jowilcox@vt.edu> | |
* @revision Carlos Guimarães <cvsguimaraes@gmail.com> | |
* @version Wed Mar 12 13:00:00 EDT 2014 | |
*/ |
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
// Variables used by Scriptable. | |
// These must be at the very top of the file. Do not edit. | |
// icon-color: deep-gray; icon-glyph: magic; | |
// Licence: GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007 | |
// Author: Marcus Raitner (https://fuehrung-erfahren.de) | |
// Source: https://github.com/marcusraitner/COVID-19-Dashboard | |
// ## Changelog | |
// * 1.0.1: Correction of layout of label for covid-beds | |
// * 1.0.2: Bug-Fix for Saar-Pfalz-Kreis (using GEN instead of county for join) | |
// * 1.0.3: Bug-Fix for Landsberg a. Lech (now using both GEN and county) |
#Generate cities data
wget http://download.geonames.org/export/dump/cities15000.zip
unzip cities15000.zip
node geonames.js cities15000.txt
The result is json array of cities in the following format:
{
_id:
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 | |
// The code is inspired by the following discussions and post: | |
// http://stackoverflow.com/questions/5483851/manually-parse-raw-http-data-with-php/5488449#5488449 | |
// http://www.chlab.ch/blog/archives/webdevelopment/manually-parse-raw-http-data-php | |
/** | |
* Parse raw HTTP request data | |
* | |
* Pass in $a_data as an array. This is done by reference to avoid copying |
NewerOlder