Skip to content

Instantly share code, notes, and snippets.

View lookingcloudy's full-sized avatar

lookingcloudy

View GitHub Profile
@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 / 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",
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 / 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);
}
@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.
//