Skip to content

Instantly share code, notes, and snippets.

View johnhaley81's full-sized avatar

John Haley johnhaley81

View GitHub Profile
[{"tweet":{"created_at":"Thu May 11 17:21:03 +0000 2017","id":862719211717533700,"id_str":"862719211717533696","text":"The @GitKraken Chipotle button has appeared today. And now I'm hungry. https://t.co/2lkQsrS24n","truncated":false,"entities":{"hashtags":[],"symbols":[],"user_mentions":[{"screen_name":"GitKraken","name":"Axosoft GitKraken","id":3094114742,"id_str":"3094114742","indices":[4,14]}],"urls":[],"media":[{"id":862719198123794400,"id_str":"862719198123794432","indices":[71,94],"media_url":"http://pbs.twimg.com/tweet_video_thumb/C_j-ijEUIAAwsD-.jpg","media_url_https":"https://pbs.twimg.com/tweet_video_thumb/C_j-ijEUIAAwsD-.jpg","url":"https://t.co/2lkQsrS24n","display_url":"pic.twitter.com/2lkQsrS24n","expanded_url":"https://twitter.com/Cycododge/status/862719211717533696/photo/1","type":"photo","sizes":{"small":{"w":340,"h":154,"resize":"fit"},"medium":{"w":600,"h":272,"resize":"fit"},"thumb":{"w":150,"h":150,"resize":"crop"},"large":{"w":636,"h":288,"resize":"fit"}}}]},"extended_entities":{"media":
@johnhaley81
johnhaley81 / CommitZone.jsx
Created April 27, 2017 16:02
Connector and Presentation components. Living Together!!
// @flow
import React from 'react';
import classnames from 'classnames';
import fp from 'lodash/fp';
import { connect } from 'react-redux';
import type {
MapDispatchToProps,
MapStateToProps
@johnhaley81
johnhaley81 / factorialCallbackTest.js
Last active March 18, 2021 22:38
Factorial promise/generator test
function factorialCallback(acc, n, callback) {
if (n === 0) {
callback(acc);
} else {
setImmediate(() => factorialCallback(acc * n, n - 1, callback));
}
}
function timedFactorialCallback(n) {
const start = new Date();
@johnhaley81
johnhaley81 / npm-stderr
Created May 10, 2016 15:44
Installing atom-keymap for electron version 0.37.8
johnhosx :: ~/Development/GitKraken ‹feature/update-electron-0.37.8› » npm install atom-keymap@atom/atom-keymap#master 1 ↵
> [email protected] install /Users/johnh/Development/GitKraken/node_modules/runas
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Invalid version number: ^0.37.8
gyp ERR! stack at getNodeDir (/Users/johnh/.nvm/versions/node/v5.9.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:69:25)
gyp ERR! stack at /Users/johnh/.nvm/versions/node/v5.9.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:41:7
gyp ERR! stack at /Users/johnh/.nvm/versions/node/v5.9.1/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:393:9
#0 0x00007fc83ef3851c in lh_new () from /home/qa/Downloads/GitKraken/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node
#1 0x00007fc83ef27781 in int_err_get () from /home/qa/Downloads/GitKraken/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node
#2 0x00007fc83ef27966 in int_err_set_item () from /home/qa/Downloads/GitKraken/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node
#3 0x00007fc83ef25bcd in ERR_load_ERR_strings () from /home/qa/Downloads/GitKraken/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node
#4 0x00007fc83ef27fc9 in ERR_load_crypto_strings () from /home/qa/Downloads/GitKraken/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node
#5 0x00007fc83eef3239 in SSL_load_error_strings () from /home/qa/Downloads/GitKraken/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node
#6 0x00007fc83ee70aca in init_once () from /home/qa/Downloads/GitKraken/resources/app
@johnhaley81
johnhaley81 / gdb-backlog
Created January 6, 2016 15:42
Backlog of breaking nodegit prebuilt. Run on Ubuntu 14.04 AMD Opteron 64-bit VM
Program terminated with signal SIGILL, Illegal instruction.
#0 0x00007fffe75b951c in lh_new ()
from /home/qa/Downloads/GitKrakenBreaking/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node
#1 0x00007fffe75a8781 in int_err_get ()
from /home/qa/Downloads/GitKrakenBreaking/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node
#2 0x00007fffe75a8966 in int_err_set_item ()
from /home/qa/Downloads/GitKrakenBreaking/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node
#3 0x00007fffe75a6bcd in ERR_load_ERR_strings ()
from /home/qa/Downloads/GitKrakenBreaking/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node
#4 0x00007fffe75a8fc9 in ERR_load_crypto_strings ()
@johnhaley81
johnhaley81 / ldd-output-prebuilt-nodegit.node
Created January 5, 2016 21:57
This is the `ldd -v` output for the `nodegit.node` binaries
linux-vdso.so.1 => (0x00007fff5b0d2000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd860d17000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd860a1b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd860804000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd8605e7000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd860229000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd861713000)
Version information:
dist.prebuilt/GitKraken/resources/app.asar.unpacked/node_modules/nodegit/build/Release/nodegit.node:
@johnhaley81
johnhaley81 / agent.cmd
Last active August 29, 2015 14:24
cmder files
@ECHO OFF
REM Set default sock file
SET SSH_AUTH_SOCK=/tmp/ssh-agent.sock
REM Check socket is available
IF NOT EXIST "%TMP%\ssh-agent.sock" GOTO:RUNAGENT
REM Check if an ssh-agent is running
FOR /f "tokens=*" %%I IN ('ps ^| grep ssh-agent ^| sed "s/^ *\([0-9]\+\) .*/\1/"') DO SET VAR=%%I
johnhosx-2 :: ~/Development/gaston ‹new-gaston*› » npm install
> [email protected] install /Users/johnh/Development/gaston/node_modules/watchify/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild
SOLINK_MODULE(target) Release/.node
SOLINK_MODULE(target) Release/.node: Finished
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
SOLINK_MODULE(target) Release/fse.node: Finished
@johnhaley81
johnhaley81 / remote_callbacks.cc
Created April 20, 2015 18:04
Trying out fixing cross thread calling in nodegit
// This is a generated file, modify: generate/templates/struct_content.cc.
#include <nan.h>
#include <string.h>
#include <chrono>
#include <thread>
extern "C" {
#include <git2.h>
}