Skip to content

Instantly share code, notes, and snippets.

$(function() {
initializeMap();
$("#ContactForm").submit(function(e) {
SendContactEmail(); return false;
});
});
[
{
"icon": "https:\/\/maps.gstatic.com\/mapfiles\/place_api\/icons\/school-71.png",
"latitude": 35.8726254,
"longitude": -86.8110186,
"name": "fred j page",
"type": "school",
"types": [
"school",
"point_of_interest",
@ogt
ogt / howto-publish-an-npm-module.txt
Last active December 19, 2015 09:49
HOWTO - Publish an npm module
# assumes that you are on a repo that is committed, pushed to github that you want to publish
a new version of an existing module that is already pointing to this github repo
# if machine not already authorized of
> npm adduser
# the following command will change the version specified in the
# package.json file, git add, git commit, and add a git tag 1.2.3 for you
npm version 1.2.3
@ogt
ogt / howto-mount-s3-bucket.md
Created April 2, 2013 17:29
HOWTO - Mount an S3 bucket to a local file folder

We use Fuse FS and s3fs.

For instructions about how to create a bucket with its own access keys - so as you don't spread your own access keys everywhere) check this gist: https://gist.github.com/ogt/5294121

># install fuse from http://osxfuse.github.com/
 
> brew install s3fs
> brew info fuse4x-kext
…
@ogt
ogt / howto-s3bucket.md
Last active March 25, 2022 21:31
HOWTO - Create an amazon s3 bucket with its own domain, access keys

Assume that we want to create a bucket called foo.mydomain.com, and you have already mydomain.com

1. Create the bucket.
  - go to AWS console, s3, select the s3 region that you want.
  - name the bucket foo.mydomain.com
  - save and then select -> click actions-> properties 
  -> in properties click permissions -> add permissions add VIEW for EVERYBODY (s3 files are unguessable urls)

2. Create the CNAME
@ogt
ogt / tree.md
Last active December 15, 2015 17:09
Example tree
@ogt
ogt / Maven-Heroku Testing.md
Last active December 15, 2015 11:49
Test transcript for pull request
ithaca:projects odysseas$ hub clone contractor-recommendations
Cloning into contractor-recommendations...
remote: Counting objects: 192, done.
remote: Compressing objects: 100% (148/148), done.
remote: Total 192 (delta 47), reused 173 (delta 28)
Receiving objects: 100% (192/192), 7.60 MiB | 1.24 MiB/s, done.
Resolving deltas: 100% (47/47), done.

ithaca:projects odysseas$ cd !$
@ogt
ogt / web
Created February 19, 2013 05:32
minimal web server using connect
var fs = require('fs');
var path = require('path');
var port = process.env.PORT || 8081;
var connect = require('connect');
connect.createServer(
connect.logger('dev'),
connect.favicon('public/favicon.ico'),
connect.static(__dirname + '/public')
).listen(port);
@ogt
ogt / gist:4974301
Last active December 13, 2015 20:59
> mkdir ~/Dropbox/Home/code/node/helloworld-js-heroku
> cd !$
> # add a minimal hello world app
> cat > index.html
<html>
<body>
hello world!!!
</body>
</html>
^D