Skip to content

Instantly share code, notes, and snippets.

View enquora's full-sized avatar

David Richardson enquora

  • Enquora Data Services
View GitHub Profile
{
"_default_" : {
"date_formats" : ["yyyy-MM-dd", "yyyy/MM/dd"]
}
}
@enquora
enquora / CPNavigationBar.j
Created May 20, 2016 04:19 — forked from nickjs/CPNavigationBar.j
CPNavigationController & CPViewController
/*
* CPNavigationBar.j
* AppKit
*
* Created by Nicholas Small.
* Copyright 2009, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@enquora
enquora / 0_reuse_code.js
Created July 27, 2016 19:58
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@enquora
enquora / CPWindow+animations.j
Last active May 13, 2017 00:14 — forked from Me1000/CPWindow+animations.j
Pretty window animations for Cappuccino CPWindow.
/*!
Created by Randy Luecke April 22nd 2011
Copyright RCLConcepts, LLC.
All right reserved.
This code is available under the MIT license.
*/
@enquora
enquora / jscore.md
Created October 25, 2017 17:02 — forked from mheiber/jscore.md
Using JavaScriptCore in a Production iOS app

JavaScriptCore is a built-in iOS library that enables you to use JavaScript in apps alongside Objective-C and Swift. It lets developers read JavaScript from a string, execute it from Objective-C or Swift, and share data structures and functions across languages. We JavaScriptCore to share code between Web and iOS.

Sharing code helped us produce a high-quality, consistent experience across devices while iterating rapidly.

This post is about why we chose to use JavaScriptCore and what we learned. The biggest challenges to using JavaScriptCore in a production app were performance optimization for older devices and getting the build process right. Luckily, these problems have simple solutions that just weren't documented.

Why did we use JavaScriptCore?

A killer feature of one of our apps is search that is optimized for finding guests by name. Our goals included:

@enquora
enquora / CouchDB_Python.md
Created April 24, 2018 21:59 — forked from marians/CouchDB_Python.md
The missing Python couchdb tutorial

This is an unofficial manual for the couchdb Python module I wish I had had.

Installation

pip install couchdb

Importing the module

<div style="overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 717px; top: 0px; width: 323px; height: 25px; display: block; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAZCAAAAADV+xujAAAAFUlEQVQIW2P4z8TAhIkxSQhmYLoJAGdnDf0BhEofAAAAAElFTkSuQmCC); background-size: 1px 25px; transform: translateX(0px); background-position: initial initial; background-repeat: initial initial;" data-cappuccino-view="_CPTableColumnHeaderView" data-cappuccino-uid="62875"><div style="overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 0px; top: 0px; width: 323px; height: 25px; display: block;" data-cappuccino-view="_CPImageAndTextView" data-cappuccino-uid="62876"></div><div style="overflow: hidden; position: absolute; visibility: visible; z-index: 0; left: 5px; top: 0px; width: 313px; height: 25px; text-align: left; color: rgb(128, 128, 128);" data-cappuccino-view="_CPImageAndTextView" data-cappuccino-uid="62887"><div style="position: absolute; white-spac
/*
* CPPropertyAnimation.j
* AppKit
*
* Created by Nicholas Small.
* Copyright 2008, Nicholas Small.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@enquora
enquora / cltools.sh
Created July 21, 2018 03:59 — forked from justinbellamy/cltools.sh
Install Autoconf and Automake on OS X El Capitan
#!/bin/sh
##
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
#
# This script is originally from http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build
@enquora
enquora / gist:57b56b06f3ee0f5e20c8501209e34740
Last active July 21, 2018 04:31
Error building JavaScriptCore engine for narwhal on Mojave
Would you like to build the JavaScriptCore engine? This is optional but will
make building and running Cappuccino and Objective-J much faster.
Enter "yes" or "no":
yes
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:18: installing './compile'