Skip to content

Instantly share code, notes, and snippets.

View jgeewax's full-sized avatar
🤯
Learning

JJ Geewax jgeewax

🤯
Learning
View GitHub Profile
{
"document": {
"@source": "/usr/local/google/home/jjg/gcloud-python/docs/datastore-queries.rst",
"section": {
"@ids": "module-gcloud.datastore.query queries",
"@names": "queries",
"title": "Queries",
"index": [
{
"@entries": "['single',\\ u'gcloud.datastore.query\\ (module)',\\ u'module-gcloud.datastore.query',\\ '']"

Keybase proof

I hereby claim:

  • I am jgeewax on github.
  • I am jgeewax (https://keybase.io/jgeewax) on keybase.
  • I have a public key whose fingerprint is D2A1 E17F 4201 AD9C 63F0 7C61 6662 FBBA D75F 3E74

To claim this, I am signing this object:

@jgeewax
jgeewax / gist:96a181561560415ce5f1
Created May 11, 2015 18:35
OneName Verification
Verifying I am +jgeewax on my passcard. https://onename.com/jgeewax
@jgeewax
jgeewax / recording.md
Created February 8, 2014 16:45
Screen recording...

Screen recording

Ubuntu

$ sudo apt-get install recordmydesktop

Windows

#!/usr/bin/env python
# Need to import and fix the sys path before importing other things.
import remote_api_shell
remote_api_shell.fix_sys_path()
import time
from google.appengine.api import datastore_admin
from google.appengine.ext.remote_api import remote_api_stub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5Q/nVsfnKplqQLN3Vib0DMeb+znv+IK4hQ2WBAMxer6Fdv5yE6Ox/KitSy/X4GcckBduo+WL15RMkeEQTj+rIUkPBpog6fsRMATWpb8X+C5qgnd2f/sIbJ1JdJBqzSncdyd+Brb2HHF2HczhtNwP4F9lPdauPzU/sFwh7mVzUxYYIMTNZ3jfLBPn7LOC/mBHzGak7xlkSF47oJOTkI5oWFl1S1Cc7ZssHgs9GCAhMoI4Yl9SUBAtEYiZ0OI4RBmEbV5izz32IZccBQhxVzUELEHbpyvivNtVP2bUDJtTHv0PtHJgYKt6L+ZxGb8qPfV2dBVERt94Xo4RqaYOKxcqz [email protected]
# The session name should have been passed in, but if not
# default to 'default-session-name'
session=${1-"default-session-name"}
# Create and name some windows.
tmux rename-window -t $session:1 bash
tmux new-window -t $session:2 -n webserver
tmux new-window -t $session:3 -n python
tmux new-window -t $session:4 -n templates
tmux new-window -t $session:5 -n js
@jgeewax
jgeewax / .tmux.conf
Created March 22, 2013 01:40
tmux configuration file
# Leader key should be the same as screen (C-a)
set -g prefix C-a
# Double tap to go to previous window
bind C-a last-window
# Splitting windows should use | and -
unbind %
bind | split-window -h
bind - split-window -v
class BaseModel(db.Expando):
@classmethod
def filter_prefix(cls, property_name, prefix):
query = cls.all()
query.filter("%s >= " % property_name, u"%s" % prefix)
query.filter("%s < " % property_name, u"%s\xEF\xBF\xBD" % prefix)
return query
@jgeewax
jgeewax / handler.py
Created July 21, 2012 14:28
Getting objects from the App Engine data store based on URL parameters
from google.appengine.ext import db
import webapp2
from models.my_model import MyModel
class Handler(webapp2.RequestHandler):
def get(self):
try:
my_model = MyModel.get(self.request.get('my_model_key'))