Skip to content

Instantly share code, notes, and snippets.

@espy
espy / monorepo-todo.md
Last active April 5, 2018 12:16 — forked from Realtin/monorepo-todo.md
What is left todo for the monorepo release

TODO Monorepo

⚠️ Needs to be fixed before further testing ⚠️

Features

  • Greenkeeper can find all package.json files in a repository.
  • The combined package information from all package.json files is stored in a repository document in the Greenkeeper database.
  • By default there will be one pull request per dependency (affecting multiple package.json files).
// Google Forms Slack Notification
// Andy Chase <github.com/andychase>
// License: CC0 1.0 Universal <creativecommons.org/publicdomain/zero/1.0>
// Install 1: This code goes in ( tools > script editor... ) of your google docs form
// Install 2: ( resources > current project triggers ) ( [onSubmit], [from Form], [On form submit] )
// Setup 1: Put your slack api url below
var POST_URL = "https://hooks.slack.com/services/";
function onSubmit(e) {
@espy
espy / gist:8e53138e3c6f27c24ade683059a5904e
Last active June 17, 2016 13:52
A-Class request and response for Beaconsfield
// REQUEST
{
"priority": "Location",
"model": 1,
"transmission": 0,
"fueltype": 0,
"engine": 0,
"trim": 0,
"postcode": "hp201xg",
[Fri, 12 Jul 2013 15:42:43 GMT] [error] [<0.129.0>] {error_report,<0.30.0>,
{<0.129.0>,crash_report,
[[{initial_call,
{mochiweb_socket_server,init,['Argument__1']}},
{pid,<0.129.0>},
{registered_name,[]},
{error_info,
{exit,eaddrinuse,
[{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,320}]},
[www] OPTIONS /_api/_users/org.couchdb.user%3Auser_anonymous%2F1232131 200 0ms
[www] PUT /_api/_users/org.couchdb.user%3Auser_anonymous%2F1232131 201 11ms - 102b
[email-out] binding to db: "1232131"
this.config
{ server: 'http://127.0.0.1:6018',
persistent_since_storage: false,
admin: { user: 'admin', pass: 'admin' },
app: { email: { transport: [Object] } },
user: {} }
[email-out] Starting EmailOut Worker for user/1232131
{"docs":[{"_rev":"5-yql4g4xsv","text":"Woop","point":"q2yn3j6","createdBy":"wkcnhzj","updatedAt":"2013-07-04T12:39:38.575Z","createdAt":"2013-07-04T12:39:38.575Z","_revisions":{"start":5,"ids":["yql4g4xsv","kz4d10zis"]},"_deleted":true,"type":"message","_id":"message/jxr55qw"},{"_rev":"5-j2dkaxivl","text":"Aha","point":"q2yn3j6","createdBy":"wkcnhzj","updatedAt":"2013-07-04T12:39:40.894Z","createdAt":"2013-07-04T12:39:40.894Z","_revisions":{"start":5,"ids":["j2dkaxivl","o1wiegtiu"]},"_deleted":true,"type":"message","_id":"message/2s1xfxu"},{"_rev":"5-v3g3dnf74","text":"Yay!","point":"zp08o8b","createdBy":"wkcnhzj","updatedAt":"2013-07-04T12:39:44.736Z","createdAt":"2013-07-04T12:39:44.736Z","_revisions":{"start":5,"ids":["v3g3dnf74","5o8inyy65"]},"_deleted":true,"type":"message","_id":"message/dt0czqc"},{"_rev":"5-98ysmy8zu","x":346,"y":589,"image":"sh9lz6q","createdBy":"wkcnhzj","updatedAt":"2013-07-04T12:39:35.217Z","createdAt":"2013-07-04T12:39:35.217Z","_revisions":{"start":5,"ids":["98ysmy8zu","cxqzbxe4g
  • What's your favorite animal?

As a species, the Red Panda. It's hard to argue with so much cuteness. Otters are similarly cute, but soggier. However, for an individual animal, I'd have to pick this cat.

best_cat_ever-alpine_lynx_bengal_mix

No idea where this jpg originally came from, and I don't really know much about the cat itself, other than what’s revealed by the filename, best_cat_ever-Alpine_Lynx_Bengal_mix.jpg. It’s true though. That is undoubtedly the best cat ever.

  • What's your role / what have you contributed to Hoodie?
@espy
espy / qtranslate_javacript.php
Created October 17, 2012 10:26
Extend qTranslate for WordPress to automatically generate slugs for qTranslate Slug
# add this function to the end of qtrans_initJS() in qtranslate_javacript.php
$q_config['js']['qtrans_autogenerate_slug'] = "
function string_to_slug(str) {
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = 'àáäâèéëêìíïîòóöôùúüûñç·/_,:;';
var to = 'aaaaeeeeiiiioooouuuunc------';
@espy
espy / gist:3098188
Created July 12, 2012 13:43
I have a Dreamcode
// Making individual Attributes in a document public
// Problem: direct couch access
{
"_id":"couch/ag0qdhr",
"_rev":"8-b109320befe2c1db1e9c770911a3cd7c",
"$public": ["email", "color"],
"type":"couch"
"color":"purple",
"email": "terriblyimportant@posh.com",
@espy
espy / corsserver.py
Last active August 29, 2015 14:20
Run `python corsserver.py`. This will start a local server on port 8000.
#! /usr/bin/env python2
from SimpleHTTPServer import SimpleHTTPRequestHandler
import BaseHTTPServer
class CORSRequestHandler (SimpleHTTPRequestHandler):
def end_headers (self):
self.send_header('Access-Control-Allow-Origin', '*')
SimpleHTTPRequestHandler.end_headers(self)
if __name__ == '__main__':