Skip to content

Instantly share code, notes, and snippets.

View jimmycuadra's full-sized avatar
☠️
GitHub profits from the separation of families and the deaths of children.

jimmycuadra

☠️
GitHub profits from the separation of families and the deaths of children.
View GitHub Profile
@sirhopcount
sirhopcount / Cli output
Created December 10, 2014 19:15
docker + lita problem
Run lita+docker interactively:
$ sudo docker run -ti --link lita_redis:litadb sirhopcount/lita
Type "exit" or "quit" to end the session.
Lita > quit
Run it as daemon:
$ sudo docker run -d --link lita_redis:litadb sirhopcount/lita
FROM litaio/ruby
MAINTAINER "Ted Wexler <ted@stuckinacan.com>"
RUN apt-get update
RUN apt-get install -y redis-server libssl-dev
RUN gem install lita
ADD conf/ /srv/lita-docker/
WORKDIR /srv/lita-docker
RUN bundle install
CMD service redis-server start && bundle exec lita start
@jimmycuadra
jimmycuadra / things_you_shouldnt_use.md
Created January 8, 2015 07:06
Things You Shouldn't Use
  • Microsoft Windows
  • Phabricator
  • Language-specific build tools (Rake, Grunt, etc.)
  • Angular.js
  • Solano CI (formerly TDDium)
@matthewtodd
matthewtodd / asset_tag_helper.rb
Created July 12, 2010 04:57
Rails + Sass + Asset Fingerprints + Heroku
# Ensure AssetTagHelper has been loaded before we try to monkey-patch it.
require 'action_view/helpers/asset_tag_helper'
module ActionView::Helpers::AssetTagHelper
# Insert the asset id in the filename, rather than in the query string. In
# addition to looking nicer, this also keeps any other static file handlers
# from preempting our Rack::StaticCache middleware, since these
# version-numbered files don't actually exist on disk.
def rewrite_asset_path(source)
source.insert source.rindex('.'), "-#{rails_asset_id(source)}"
@certik
certik / gist:735587
Created December 10, 2010 00:47
.gitconfig
[user]
name = Ondrej Certik
email = ondrej@certik.cz
[color]
ui = auto
interactive = true
[alias]
ci = commit
@jimmycuadra
jimmycuadra / gist:856867
Created March 6, 2011 00:26
Jimmy's wish list

Jimmy's wish list

  • Threadless gift certificates
  • iTunes store credit
@jimmycuadra
jimmycuadra / dontsaythese.textile
Created June 2, 2011 19:56
Shit you are not allowed to say

English

  • boss
  • nippy
  • hubby
  • fisticuffs
  • nighters
  • om nom nom
  • curled up with a glass of wine
  • I’m living life to the fullest
@wzdf1982
wzdf1982 / rails engine setup
Created June 24, 2012 05:19
Rails: Engine setup
generate
rails plugin new importable --dummy-path=spec/dummy --full --mountable -T
add to gemspec
s.add_dependency 'jquery-rails'
s.add_dependency 'sass-rails'
s.add_dependency 'bootstrap-sass', '~> 2.0.3'
@ClayShentrup
ClayShentrup / whale_test.rb
Created July 20, 2012 05:12
Whale question
require 'test/unit'
class Whale
def self.attr_validated(method_name, &validation)
# Enter code here to make all tests pass.
end
attr_validated :num_teeth do |v|
v <= 4
end
@ClayShentrup
ClayShentrup / beget.js
Created July 20, 2012 06:59
beget question
function beget(parent, child){
// put code here to make test() return true
};
function test(){
function Parent(){
throw 'exception';
};
Parent.prototype = {code: Math.random()};