Skip to content

Instantly share code, notes, and snippets.

View lookingcloudy's full-sized avatar

lookingcloudy

View GitHub Profile
@lookingcloudy
lookingcloudy / gist:8196828
Created December 31, 2013 13:30
nodejs server side proxy example using restify, showing a proxy to smarty streets address service
// NODE.JS - SMARTY STREETS SERVER SIDE PROXY EXAMPLE
//
// Smarty streets does not currently support HTTP OPTIONS. Because of this,
// if setting custom headers, it cannot be called from a browser-side library
// like AngularJS.
//
// This is a server side proxy for smarty-streets. It takes the request
// query string and passes it on to Smarty Streets along with any of the
// custom headers that Smarty Streets currently supports.
//
@lookingcloudy
lookingcloudy / gist:8211904
Created January 1, 2014 21:56
NodeJS Inheriting from EventEmmitter class
var sys = require('sys'),
events = require('events');
function Downloader() {
if(false === (this instanceof Downloader)) {
return new Downloader();
}
events.EventEmitter.call(this);
}
Here is the library client now:
innotas.createClient()
.then(function (client) {
innotas.login(client, user, pass)
})
.then(function (client) {
console.log("calling projects", client);
innotas.getProjects(client);
})
@lookingcloudy
lookingcloudy / autofile.json
Last active February 12, 2023 02:03
Evernote - auto file notes, apply tags, and move to notebook, using Python
{
"configuration": {
"consumerKey": "not needed with personal account",
"consumerSecret": "not needed with personal account",
"developerToken": "Get this here in your personal production account https://www.evernote.com/api/DeveloperToken.action"
},
"autofile": [
{
"search": "notebook:!!inbox myBalsamiq",
"notebook": "21 - Expense Reports",
@lookingcloudy
lookingcloudy / normalize_dates.py
Last active August 29, 2015 14:08
Evernote - normalize dates in titles using python
######
## normalize_dates.py
## this will search for any 1* or 2* in the title, then will process each note returned using pythons regular expressions
## if a date is detected in any of these formats: YYMMDD, YYYYMMDD, YY-MM-DD, YY_MM_DD, YYYY_MM_DD, YYYY-MM-DD
## it is rewritten to a normalized format
##
## I tend to prefix note titles with a date format, but am not very consistent. This will normalize all those into the
## same format. It will not fix m/d/y date formats, since I am not interested in those, but feel free to add it!
##
## Developer documentation: https://dev.evernote.com/doc/
@lookingcloudy
lookingcloudy / owncloud-omv
Last active October 6, 2018 15:38
nginx configuration for owncloud running on OMV
## NGINX Configuration file for owncloud 7 running on Open Media Vault version 1
server {
listen [::]:8443 default_server ipv6only=off ssl deferred;
ssl_certificate /etc/ssl/certs/openmediavault-bcdd5585-47e8-4bc3-a069-b3e21bbcee7e.crt;
ssl_certificate_key /etc/ssl/private/openmediavault-bcdd5585-47e8-4bc3-a069-b3e21bbcee7e.key;
server_name owncloud;
root /var/www/owncloud;
index index.php;
autoindex off;
@lookingcloudy
lookingcloudy / client.opvn
Last active March 16, 2023 05:38
Setup OpenVPN on Open Media Vault Server
#sample client configuration file
#place the ca.crt, client.crt, and client.key
#in the same folder as this configuration file.
#Import this into your OpenVPN client
client
dev tun
proto udp
# change this to the IP or name of your server
@lookingcloudy
lookingcloudy / readme
Created December 1, 2014 01:57
Setup internal DNS server using DNSMasq on OMV server
# This is for a home network
# My OMV server is: 10.0.0.99
# I kept DHCP running on my router for simplicity
# Install dnsmasq
apt-get install dnsmasq
# Edit the configuration file
nano /etc/dnsmasq.conf
@lookingcloudy
lookingcloudy / main.html
Last active August 29, 2015 14:27
Meteor with Materialize
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" charset="utf-8"/>
<meta name="description" content="grocery list savings messenger"/>
<link rel="icon" href="/public/images/favicon.ico"/>
<title>Listory</title>
</head>
<body>
<nav class="light-blue lighten-5" role="navigation">
@lookingcloudy
lookingcloudy / hubot.conf
Created September 18, 2015 01:10
Hubot on Digital Ocean
#!upstart
description "Hubot Service"
start on runlevel [2345]
stop on runlevel [06]
env HUBOT_DIR='/opt/hubot/'
env HUBOT='bin/hubot'