Skip to content

Instantly share code, notes, and snippets.

View jdoleary's full-sized avatar
🌱

Jordan O'Leary jdoleary

🌱
View GitHub Profile
@jdoleary
jdoleary / extract-kindle-highlights.js
Created October 7, 2023 09:44
Extract kindle highlights and convert to markdown quote
// Kindle truncates long highlights in some views.
// To get full, un-truncated notes, go to https://read.amazon.com/kindle-library
// in the sidebar click on "Notes & Highlights
// To just get all the highlights in an array
Array.from(document.querySelectorAll('#highlight')).map(x => x.innerText)
// To get highlights as markdown
Array.from(document.querySelectorAll('#highlight')).map(x => (`> ${x.innerText}`)).join('\n\n')

Keybase proof

I hereby claim:

  • I am jdoleary on github.
  • I am jdoleary (https://keybase.io/jdoleary) on keybase.
  • I have a public key ASAIdoeQ64RqXaURfDksziZj4KPsq8trAMzQdi9Myu1pIwo

To claim this, I am signing this object:

@jdoleary
jdoleary / resume.md
Last active November 14, 2018 03:15
Resume

Jordan O'Leary

Contact Info
Address 1315 Hoffman Ave, Royal Oak, MI 48067
Cell (248) 345-7894
Email jdoleary@gmail.com

Philosophy

My mission is to write code that is intuitive, effective, robust, scalable and maintainable.

@jdoleary
jdoleary / saga-implementation-example.js
Last active November 6, 2018 02:40
Faux Implementation of Redux-Saga
/*
The following is a fake implementation of functions inside of Redux-Saga.
*/
// Simplistic fake implementations of Saga Effects
const put = action => ({effect:'PUT', action});
const call = fn => ({effect:'CALL', fn});
// Simplistic fake implementation of runSaga
function runSaga(genFn, ...args){
import _ from 'lodash';
import uid from 'uuid/v4';
export default function(){
return {
// Current time in millis
time:0,
// one 'day' occurs every x milliseconds:
millisPerDay: 60000,
events:[],
@jdoleary
jdoleary / flexibleComposition.js
Last active September 9, 2017 18:55
Flexible Object Composition with "Constructor"
/*
How to compose object AND change things inside the factories used to compose
while maintaining an exact reference to the original object and being able to
access variables from any factory.
*/
var a = {a:1};
function factory(state){
// State is still the original object:
### Keybase proof
I hereby claim:
* I am jdoleary on github.
* I am jdoleary (https://keybase.io/jdoleary) on keybase.
* I have a public key ASCf5SEoo0XPubfyzER-JjJFWxD5HgPbYF0HlMImoHTcPgo
To claim this, I am signing this object:
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@jdoleary
jdoleary / Subject Object.markdown
Created November 25, 2015 05:19
Subject Object
@jdoleary
jdoleary / Bring joe a rock.markdown
Created November 25, 2015 05:19
Bring joe a rock