Skip to content

Instantly share code, notes, and snippets.

View webmaven's full-sized avatar

Michael R. Bernstein webmaven

View GitHub Profile

To install:

  1. Clone this gist as a git repo
  2. npm install in it
  3. node index.js
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@drgarcia1986
drgarcia1986 / bottle_hello.py
Last active September 30, 2022 16:19
Python HelloWorld (WebFrameworks) Collection
# -*- coding: utf-8 -*-
from bottle import route, run
@route('/')
def index():
return '<h1>Hello World/h1>'
run(host='localhost', port=8000)
@href
href / gist:00cabf7fe4d35f694879
Created December 7, 2014 12:24
A Stab at Chameleon Integration in Morepath
import inspect
import morepath
import os
class ChameleonApp(morepath.App):
@morepath.reify
def chameleon_template_paths(self):
""" Returns *absolute* paths to chameleon templates.
@app.route('/login/<provider_name>', methods=['GET', 'POST'])
@authomatic.login('g')
@requires_ssl
def login(provider_name):
if g.user is not None and g.user.is_authenticated():
return redirect(url_for('index'))
if authomatic.result:
if authomatic.result.error:
return 'Something went wrong: {0}'.format(authomatic.result.error.message)
if authomatic.result.user:
@erichiggins
erichiggins / bootstrap.py
Last active January 2, 2017 00:36
Adding Google App Engine SDK to Python virtualenv
#!/usr/bin/env python
"""
Setup a virtualenv with the Google App Engine SDK.
References:
http://virtualenv.readthedocs.org/en/latest/virtualenv.html#creating-your-own-bootstrap-scripts
http://mindtrove.info/virtualenv-bootstrapping/
"""
import hashlib
import os
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.20179691910743713</real>
<key>Green Component</key>
<real>0.1818026602268219</real>
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google