PostgreSQL Type | PostgreSQL Size | Description | Range | Diesel Type | Rust Type |
---|---|---|---|---|---|
Nullable Types | nullable | Nullable `` |
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
/* | |
* Serverless Geolocation via Cloudflare Workers. | |
* | |
* Idea originally from blog https://maxkostinevich.com/blog/serverless-geolocation | |
* | |
* Tested and working on deployed Cloudflare worker. | |
* | |
* Code Authors, Contact and Ownership/License | |
* 1. Marius. (https://gist.github.com/maephisto/9228207) © 2014. License Unknown. | |
* 2. Max Kostinevich. (https://maxkostinevich.com) © 2020. License Unknown. |
This guide uses the domain your-domain.tld
and its www.
prefixed version.
It starts the rocket application on 127.0.0.1:1337
and as the user www-data
. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.
I hereby claim:
- I am admwrd on github.
- I am crab (https://keybase.io/crab) on keybase.
- I have a public key whose fingerprint is 7E90 E284 D74A A114 747A 499A 6728 9194 01C0 065E
To claim this, I am signing this object:
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
def findcount(needle, haystack): | |
import re | |
return sum(1 for _ in re.finditer(r'\b%s\b' % re.escape(needle), haystack.lower().replace(r'[a-zA-Z]',' '))) |
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
def flippy(word): | |
newword = '' | |
for i in range(0,len(word)): | |
newword += word[(i+1)*-1] | |
return newword |
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
#! env python3 | |
names = ['Julio', 'racecar', 'umbrella', 'Madam', u'すます', u'😃😜😞😜😃', u'😃😜😞😜'] | |
def pali(word): | |
#word = alphaonly(word).lower() | |
print(word+"?") | |
for i in range(0,(int)(len(word)/2)+1): | |
if word[i] is not word[(i+1)*-1]: | |
print(word[i]+", "+word[(i+1)*-1]+" do not match.") |