Skip to content

Instantly share code, notes, and snippets.

View KyleAMathews's full-sized avatar

Kyle Mathews KyleAMathews

View GitHub Profile
@aaronshaf
aaronshaf / es.sh
Created September 3, 2011 03:53
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get update
sudo apt-get install unzip curl python-software-properties -y
#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
@bangpound
bangpound / gist:1506800
Created December 21, 2011 17:09
Make Drupal 7 aggregation efficient again and use Google CDN for jQuery and jQuery UI
<?php
/**
* Implements hook_library().
*/
function MYMODULE_library() {
// jQuery UI from Google.
$libraries['ui'] = array(
'title' => 'jQuery UI: All',
'website' => 'http://jqueryui.com',
@dewski
dewski / locally.sh
Created January 20, 2012 16:58 — forked from jasonroelofs/setup-statsd.sh
Turn an EC2 micro instance into a StatsD/Graphite server
ec2-authorize default -p 2003
@karmi
karmi / .gitignore
Created March 17, 2012 14:53
ElasticSearch bootstrap script and node configuration for Ubuntu [https://gist.github.com/2050769]
.DS_Store
Gemfile.lock
*.pem
node.json
tmp/*
!tmp/.gitignore
#!/usr/bin/env bash
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz
mkdir vim && tar xzvf vim.tar.gz -C vim
export PATH=$PATH:/app/vim/bin
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 10, 2025 09:21
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@alexkirsz
alexkirsz / EventMixin.coffee
Created April 21, 2014 00:52
A mixin that transforms react components into event emitters and receivers
isEventComponent = (component) ->
component._listeners?
findNearestEventComponent = (component) ->
if (isEventComponent component)
component
else if component._owner
findNearestEventComponent component._owner
else
null
var Promise = require("bluebird");
var Request = require("superagent").Request;
/**
* @namespace utils
* @class Superagent
*/
/**
@mjackson
mjackson / FirebaseStateMixin.js
Last active February 5, 2016 11:34
A simple mixin for React components that need to bind state to a Firebase ref
var Firebase = require('firebase');
var baseRef = new Firebase('https://my-firebase.firebaseio.com');
function getSnapshotValue(snapshot) {
return snapshot.val();
}
/**
* A mixin for components that want to bind the value of a state variable
* to the value at a Firebase ref.
@gaearon
gaearon / createAsyncPage.jsx
Last active April 25, 2023 09:06
Webpack's async code splitting with React Router
'use strict';
var React = require('react');
function createAsyncHandler(getHandlerAsync, displayName) {
var Handler = null;
return React.createClass({
displayName: displayName,