Skip to content

Instantly share code, notes, and snippets.

@3zzy
3zzy / tq_pilot.md
Last active Jun 28, 2020
TQ Pilot Meeting
View tq_pilot.md

Actions user can perform

- Registration
- Login
- Logout
- Password reset
- Email change
- Update Profile (currently only bank details)
- Create a request (withdrawal / deposit)
- View account (requests / transactions)
- Contact Us
@3zzy
3zzy / regex.js
Created May 31, 2019
Australian Address Regex
View regex.js
// Address Line 1:
(\b(?:(?!\s{2,}|\$|\:|\.\d).)*\s(?:Alley|Ally|Arcade|Arc|Avenue|Ave|Boulevard|Bvd|Bypass|Bypa|Circuit|Cct|Close|Cl|Corner|Crn|Court|Ct|Crescent|Cres|Cul-de-sac|Cds|Drive|Dr|Esplanade|Esp|Green|Grn|Grove|Gr|Highway|Hwy|Junction|Jnc|Lane|Lane|Link|Link|Mews|Mews|Parade|Pde|Place|Pl|Ridge|Rdge|Road|Rd|Square|Sq|Street|St|Terrace|Tce|ALLEY|ALLY|ARCADE|ARC|AVENUE|AVE|BOULEVARD|BVD|BYPASS|BYPA|CIRCUIT|CCT|CLOSE|CL|CORNER|CRN|COURT|CT|CRESCENT|CRES|CUL-DE-SAC|CDS|DRIVE|DR|ESPLANADE|ESP|GREEN|GRN|GROVE|GR|HIGHWAY|HWY|JUNCTION|JNC|LANE|LANE|LINK|LINK|MEWS|MEWS|PARADE|PDE|PLACE|PL|RIDGE|RDGE|ROAD|RD|SQUARE|SQ|STREET|ST|TERRACE|TCE))\s.*?(?=\s{2,})
// Address Line 2:
(\b(?:(?!\s{2,}).)*)\b(VIC|NSW|ACT|QLD|NT|SA|TAS|WA).?\s*(\b\d{4})
View Planning_HO_Region.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View nginx-conf-apple-pay
#nginx config for apple pay domain verification
location /.well-known/apple-developer-merchantid-domain-association {
allow all;
autoindex on;
root /var/www/example.com/html;
add_header Content-Type text/plain;
}
@3zzy
3zzy / curl_vs_getheaders.php
Created Dec 23, 2016
cURL vs get_headers() Speed Test
View curl_vs_getheaders.php
<?php
// Get headers for 100 unique random domains with get_headers() and cURL to determine which is faster.
/*
TL;DR -> cURL is significantly faster.
get_headers (GET) vs cURL:
Execution time : 139.95884609222 seconds
Execution time : 65.998840093613 seconds
@3zzy
3zzy / strpos_array.php
Created Jul 25, 2015
strpos multiple needles
View strpos_array.php
function strpos_array($haystack, $needles, $offset=0) {
$matches = array();
//Avoid the obvious: when haystack or needles are empty, return no matches
if(empty($needles) || empty($haystack)) {
return $matches;
}
$haystack = (string)$haystack; //Pre-cast non-string haystacks
$haylen = strlen($haystack);
@3zzy
3zzy / gist:f6831eb33968ba3a53b7
Created Feb 12, 2015
Get category list from eBay
View gist:f6831eb33968ba3a53b7
<?php
$endpoint = "https://api.ebay.com/ws/api.dll";
$api_dev_name = "secret";
$api_app_name = "secret";
$api_cert_name = "secret";
$auth_token = "token";
$headers = array(