This test example is based on the Google App Engine docs and Flask docs.
To run test:
python tests/test.py ~/google-cloud-sdk/platform/google_appengine/
~/google-cloud-sdk/platform/google_appengine/
is the path to the App Engine SDK.
This test example is based on the Google App Engine docs and Flask docs.
To run test:
python tests/test.py ~/google-cloud-sdk/platform/google_appengine/
~/google-cloud-sdk/platform/google_appengine/
is the path to the App Engine SDK.
<?php | |
/* | |
* Quick and dirty script to update deprecated link format. That is, replace | |
* [[link label]] with [[link | label]]. | |
* | |
* For more information, see https://github.com/wikkawik/WikkaWiki/issues/1207. | |
* | |
* USAGE | |
* php scripts/migrateDeprecatedLinks.php | |
*/ |
# -*- coding: utf-8 -*- | |
""" | |
URL Detection | |
I'm looking for a roughly accurate URL counter for spam detection in user-submitted content. | |
REFERENCES | |
http://daringfireball.net/2010/07/improved_regex_for_matching_urls | |
""" | |
import re |
<?php | |
/** | |
* Redirect the user to another, existing, wiki page. | |
* | |
* Save to actions/redirect/redirect.php | |
* | |
* ACL for the page have precedence, therefore the user will not be redirected | |
* if he is not allowed to see the page. The redirect only occurs if the method is 'show'. | |
* Append 'redirect=no' as a param to the page URL to be not redirected. | |
* |
# Based off: https://gist.github.com/jhass/a5ae80d87f18e53e7b56 | |
AllCops: | |
Exclude: | |
- 'bin/**/*' | |
- 'db/**/*' | |
- 'config/**/*' | |
- 'script/**/*' | |
- 'Guardfile' | |
- !ruby/regexp /old_and_unused\.rb$/ | |
TargetRubyVersion: 2.5 |
# ChatGPT couldn't give this to me so I just spent an hour extracting it from a table on a thirty year-old government website. | |
# | |
# In the event I or anyone else needs this in the future... | |
OC_ZIPS = [92656, 92698, 92801, 92802, 92803, 92804, 92805, 92806, 92807, 92808, | |
92809, 92812, 92814, 92815, 92816, 92817, 92825, 92850, 92899, 92811, 92821, | |
92822, 92823, 90620, 90621, 90622, 90624, 92624, 92625, 92626, 92627, 92628, | |
90630, 92629, 92650, 92609, 92610, 92708, 92728, 92831, 92832, 92833, 92834, | |
92835, 92836, 92837, 92838, 92840, 92841, 92842, 92843, 92844, 92845, 92846, | |
92605, 92615, 92646, 92647, 92648, 92649, 92602, 92603, 92604, 92606, 92612, |