This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Place in '${chromeProfilePath}\User StyleSheets\Custom.css' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On server | |
----------------- | |
# make a git repo | |
$ mkdir /path/to/repo.git | |
$ cd /path/to/repo.git | |
$ git init --bare | |
# make a post-receive hook | |
# see the post-receive file in this Gist | |
# if you're using Node.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These are instructions for setting up Circle Blvd on an Amazon EC2 instance running Ubuntu, | |
or really any Ubuntu server you are happy with. | |
It assumes the default user account is 'ubuntu' (created by the AMI). | |
Directions: | |
0. Create an EC2 instance using Amazon Web Services | |
--> AMI: Ubuntu Server 14 (free tier) | |
--> Security group: Add HTTP, HTTPS, and SSH rules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Prerequisites (see below) | |
2. Set up the server | |
3. Set up the client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Most of the times an aggregation function is needed, | |
// it is a simple count or sum, which are supported by | |
// built-in functions of both CouchDB and MongoDB. | |
// | |
// This is a CouchDB design document: | |
var circlesDesignDoc = { | |
url: '_design/circles', | |
body: { | |
version: "1.0.1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To add the proper permissions to a Node.js folder in IIS, give the following object write access: | |
IIS AppPool\<app identity> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html ng-app="project"> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> | |
<script> | |
// Create your module | |
var dependencies = []; | |
var app = angular.module('project', dependencies); | |
// Create a 'defaults' service | |
app.value("defaults", /* your server-side JSON here */); | |
// e.g. { whatever: 'some default text' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to move Circle Blvd to a new server, a rough guide: | |
1. Setup CouchDB and Node | |
2. Use ssh to replicate. Something like this: | |
$ curl -X POST http://localhost:5984/_replicate -H 'Content-Type: application/json' -d '{"source":"http://localhost:9000/circle-blvd","target":"http://localhost:9001/circle-blvd","create_target":true}' | |
$ curl -X POST http://localhost:5984/_replicate -H 'Content-Type: application/json' -d '{"source":"http://localhost:9000/circle-blvd-sessions","target":"http://localhost:9001/circle-blvd-sessions","create_target":true}' | |
3. Copy the SSL certificates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(doc) { | |
if (doc.type | |
&& doc.type === "archive" | |
&& doc.summary | |
&& doc.summary.indexOf("Apply to evaluate Circle Blvd") >= 0) { | |
emit(doc.timestamp, doc); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A basic template for Angular directives | |
// that work with other directives. | |
'use strict'; | |
angular.module('ModuleName.directives') | |
.directive('myDirective', ['$timeout', 'serviceDependency', | |
function ($timeout, serviceDependency) { | |
// Directives accept dependencies in the typical | |
// Angular way. Be aware that you cannot put | |
// $scope or $element above -- they belong either |