Skip to content

Instantly share code, notes, and snippets.

@catkins
catkins / manifest.yaml
Created August 7, 2023 04:36
Helpscout airbyte low-code connector
version: 0.50.0
type: DeclarativeSource
check:
type: CheckStream
stream_names:
- Mailboxes
streams:
- type: DeclarativeStream
name: Mailboxes
primary_key:
@catkins
catkins / README.md
Last active February 5, 2018 04:17
Golang stack dump parser

Stack dump parser

Usage

As a script

Fetch a goroutine dump from the pprof endpoint

curl -q http://myapp.com:/debug/pprof/goroutine?debug=2 > goroutine.dump
@catkins
catkins / keybase.md
Created December 16, 2016 04:56
keybase.md

Keybase proof

I hereby claim:

  • I am catkins on github.
  • I am catkins (https://keybase.io/catkins) on keybase.
  • I have a public key whose fingerprint is 8832 11D7 8739 5F9C 9E69 D540 8C06 15C3 5B46 048E

To claim this, I am signing this object:

// takes array and returns hash keyed by property
const indexBy = (array, property) => array.reduce((hash, item) => {
hash[item[property]] = item
return hash;
}, {})
const get = async function (url) {
// force https on Star Wars API
const httpsUrl = url.replace('http://', 'https://')
const response = await fetch(httpsUrl)
@catkins
catkins / spotify.coffee
Created May 21, 2015 04:45
Hubot Spotify Script
# Description:
# Messing around with the Spotify API. https://developer.spotify.com/web-api/
#
# Commands:
# hubot spotify (album|track|artist|playlist) <query> - Searches Spotify for the query and returns the embed link
#
# Author:
# catkins (2015)
#
@catkins
catkins / spotify.coffee
Last active August 29, 2015 14:21
Hubot script to search tracks on Spotify
# Description:
# Messing around with the Spotify API. https://developer.spotify.com/web-api/
#
# Commands:
# hubot spotify (album|track|artist|playlist) <query> - Searches Spotify for the query and returns the embed link
#
# Author:
# catkins (2015)
#
@catkins
catkins / bower.json
Last active August 29, 2015 14:15
emberfire.js
{
"name": "emberfire",
"main": "emberfire.js",
"dependencies": {
"firebase": "2.1.x"
},
"ignore": [
"**/.*",
"src",
"lib",
@catkins
catkins / emberfire.min.js
Created February 9, 2015 10:19
emberfire.min.js
/*!
* EmberFire is the officially supported adapter for using Firebase with
* Ember Data. The DS.FirebaseAdapter provides all of the standard DS.Adapter
* methods and will automatically synchronize the store with Firebase.
*
* EmberFire 0.0.0
* https://github.com/firebase/emberfire/
* License: MIT
*/
!function(){"use strict";if(void 0!==window.DS){var a=Ember.Namespace.create({VERSION:"0.0.0"});Ember.libraries&&Ember.libraries.registerCoreLibrary("EmberFire",a.VERSION),DS.Store.reopen({push:function(a,b,c){var d=this._super(a,b,c),e=this.adapterFor(d.constructor);return e.recordWasPushed&&e.recordWasPushed(this,a,d),d},recordWillUnload:function(a){var b=this.adapterFor(a.constructor);b.recordWillUnload&&b.recordWillUnload(this,a)}}),DS.Model.reopen({unloadRecord:function(){return this.store.recordWillUnload(this),this._super()}});var b=Ember.RSVP.Promise,c=Ember.EnumerableUtils.map,d=Ember.EnumerableUtils.forEach,e=Ember.String.fmt,f=function(a,c,d,e){var f=d||[];return new b(function(b,d){var g=funct
@catkins
catkins / collect_results.js
Last active August 29, 2015 14:14
Collect Jasmine Results in JSON
// pretty low-tech but works with jasmine 2.1's html runner in chrome 40
var results = $('.symbol-summary > li').map(function(x) {
return {
description: this.attributes.title.value,
status: this.attributes.class.value,
id: this.id.substr(9)
};
}).toArray();
{{input value=storage.name placeholder='Enter your name'}}
<h3>Welcome back {{storage.name}}!</h3>