Skip to content

Instantly share code, notes, and snippets.

View alayo's full-sized avatar
🎯
Focusing

Shawn Brinkman alayo

🎯
Focusing
  • Alayo
  • Boulder CO
View GitHub Profile
@alayo
alayo / Big List of Real Estate APIs.md
Created November 20, 2023 22:08 — forked from patpohler/Big List of Real Estate APIs.md
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

@alayo
alayo / nodejs_fs_mkdirsync_recursive.js
Created September 6, 2018 22:13 — forked from wilensky/nodejs_fs_mkdirsync_recursive.js
Recursive directory creation using `fs.mkdirSync()`. Recreates directory tree in series.
var fs = require('fs');
/**
* Splits whole path into segments and checks each segment for existence and recreates directory tree from the bottom.
* If since some segment tree doesn't exist it will be created in series.
* Existing directories will be skipped.
* @param {String} directory
*/
function mkdirSyncRecursive(directory) {
var path = directory.replace(/\/$/, '').split('/');
@alayo
alayo / express_postgress_knex.md
Created May 25, 2018 18:40 — forked from laurenfazah/express_postgress_knex.md
Cheat Sheet: Setting up Express with Postgres via Knex

Express & Postgres via Knex

Note: <example> is meant to denote text replaced by you (including brackets).

Setup

// global dependencies
npm install -g knex
@alayo
alayo / README.md
Created January 26, 2018 22:06 — forked from anhldbk/README.md
TLS client & server in NodeJS

1. Overview

This is an example of using module tls in NodeJS to create a client securely connecting to a TLS server.

It is a modified version from documentation about TLS, in which:

  • The server is a simple echo one. Clients connect to it, get the same thing back if they send anything to the server.
  • The server is a TLS-based server.
  • Clients somehow get the server's public key and use it to work securely with the server

2. Preparation

/**
* Algebraic Effects and Handlers as in <a href='http://www.eff-lang.org/'>Eff</a>
*/
'use strict'
//
// Note:
// new Continuation() - returns the current function's continuation.
//
@alayo
alayo / index.html
Created December 13, 2016 21:37 — forked from dugdaniels/index.html
An example of a browser-based input for Johnny-Five. Clicking the button in index.html turns on and off an LED installed on the Arduino board.
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="/socket.io/socket.io.js"></script>
<script>
$(document).ready(function() {
var socket = io.connect('http://localhost');
$('#button').click(function(e){
socket.emit('click');
e.preventDefault();
/*
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp
server, but for some reason omit a client connecting to it. I added an
example at the bottom.
Save the following server in example.js:
*/
var net = require('net');
@alayo
alayo / gist:60683fbd23d2c6ec1925
Created June 4, 2015 16:42
Child process node
// Require spawn from the child process module
var spawn = require('child_process').spawn;
// Run node with the child.js file as an argument
var child = spawn('node', ['addon']);
// Send data to the child process via its stdin stream
//child.stdin.write("Hello there!");
child.stdout.setEncoding('utf8');
// Listen for any response from the child: