I hereby claim:
- I am jeffgodwyll on github.
- I am jeffgodwyll (https://keybase.io/jeffgodwyll) on keybase.
- I have a public key whose fingerprint is 740E 80A5 3CA1 2B97 2389 2820 0C2C 7BDD 8790 843B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import requests | |
def url_exists(url): | |
response = requests.get(url) | |
return response.status_code == requests.codes.ok | |
url_exists('http://google.com') #True: exists | |
url_exists('http://jeffgodwyll.com/ht.m') #False: doesn't exist |
# Run in project root | |
# Recursively add executable bit to all files without a dot filename | |
find -type f -not -name "*.*" -exec chmod +x \{\} \; | |
# Recursively add exec bit to all files with .so in filename | |
find -type f -name "*.so*" -exec chmod +x \{\} \; | |
# Recursively add exec bit to all files with .so in filename | |
find -type f -name "*.jar*" -exec chmod +x \{\} \; |
#!/usr/bin/python | |
''' | |
Convert Blogger xml-exported file to markdown | |
Primarily from https://gist.github.com/larsks/4022537 with some modifications | |
''' | |
import os | |
import sys | |
import argparse | |
import iso8601 | |
import re |
Yeah it works + is awesomely cool (for 1st text test) |
#!/usr/bin/env python | |
# | |
# Copyright 2007 Google Inc. | |
# | |
# 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 | |
# |
Conclusion & Review | |
Q: What cloud service level does Google App Engine sit? | |
A: App Engine is a platform (PaaS) service. | |
Q: What do you need in order to get started playing with Google App Engine? | |
A: You need to get the SDK from Google. Use this downloads link to get the one for your platform. The SDK comes with client libraries which you'll use to connect to the various App Engine APIs, a set of command-line tools for administration, and a development server. Mac and PC users also get a bonus: a GUI called the "Launcher" that gives a friendly interface to users and provides access to a subset of the command-line tool functionality. |
# Snippet 1 | |
########### | |
# Copy the build folder(containing the html files) to a folder in flask's static | |
# directory and serve this way: | |
@app.route('/<dir>/<filename>', defaults={'static': True}) | |
def build_dir(dir='',filename='index.html'): | |
path = join(dir,filename) | |
return app.send_static_file(path) |
# Prevent nemo from creating a desktop window that shows icons | |
gsettings set org.nemo.desktop show-desktop-icons false |
#!/usr/bin/python | |
# | |
# Copyright 2014 Google Inc. All Rights Reserved. | |
# | |
# 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 | |
# |