Skip to content

Instantly share code, notes, and snippets.

@johnthepink
johnthepink / README.md
Created September 10, 2014 16:04
Hubot Failboat Support

Just add this bad boy in your Hubot's scripts directory, then call hubot failboat.

@johnthepink
johnthepink / deploy-app.sh
Created September 19, 2014 22:28
Deploy from Github to Heroku using Hipchat/Hubot
#!/bin/sh
# Mostly stolen from https://github.com/vidpresso/hubot-syncer/blob/master/pullpushprod.sh
cd /app
echo "Setting up SSH."
mkdir /app/.ssh
echo "$SSH_PRIVATE_KEY" > .ssh/id_rsa
echo "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
@johnthepink
johnthepink / jigsaw.sh
Created October 2, 2014 16:26
Turn your Mac in to Jigsaw
while :; do; say -v Whisper "is anybody there"; sleep 3; done
@johnthepink
johnthepink / get_basecamp_projects.rb
Last active August 29, 2015 14:08
Basecamp Alfred Workflow
require 'net/http'
require 'json'
# contants
BASECAMP_USERNAME = ARGV[0]
BASECAMP_PASSWORD = ARGV[1]
BASECAMP_EMAIL = ARGV[2]
BASECAMP_COMPANY_IDS = ARGV[3].split(",")
QUERY = ARGV[4]
@johnthepink
johnthepink / circle.yml
Created January 4, 2016 03:12
Testing Meteor with Gagarin on CircleCI OSX Environment
machine:
pre:
- brew update; brew cleanup; brew cask cleanup
- brew uninstall --force brew-cask; brew update
- brew install brew-cask
- brew install homebrew/versions/node010
- curl https://install.meteor.com | sh
- brew cask install google-chrome
- brew install chromedriver
@johnthepink
johnthepink / createClass.jsx
Last active January 16, 2016 21:58
createClass
const Article = React.createClass({
mixins: [Likeable],
// everything else
});
class Article extends React.Component {
// everything else
}
@johnthepink
johnthepink / likeable.js
Created January 16, 2016 21:58
likeable.js
import { Likes } from "apollos/core/lib/collections"
import { nav as navActions, liked as likedActions } from "apollos/core/client/actions"
import Helpers from "app/client/helpers"
const Likeable = {
componentWillMount: function() {
this.likeableAction = this.onClickAction.bind(this)
},
@johnthepink
johnthepink / mixin.jsx
Created January 16, 2016 21:58
mixin.jsx
import { Component } from "react"
import ReactMixin from "react-mixin"
import { Likeable } from "app/client/mixins"
@ReactMixin.decorate(Likeable)
export default class Article extends Component {
// everything else
}
class BitminterNative extends Component {
constructor(props) {
super(props);
this.state = {
user: null,
api_key: null,
input_value: null,
};
}
}