This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gem 'dragonfly', '~>0.9.4' | |
| group :production do | |
| gem 'fog' # for Amazon S3 | |
| end |
I hereby claim:
- I am ismasan on github.
- I am ismasan (https://keybase.io/ismasan) on keybase.
- I have a public key whose fingerprint is 3E67 5E59 B46D D332 2669 6883 2AA1 2B6D 5825 B214
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| web: bundle exec puma -p $PORT config.ru |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://github.com/eproxus/meck | |
| # add meck as a dependency in mix.exs | |
| defmodule GithubIssuesTest do | |
| use ExUnit.Case | |
| import :meck | |
| setup_all do | |
| new(Issues.GithubIssues) | |
| on_exit fn -> unload end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # A quick and dirty implementation of an HTTP proxy server in Ruby | |
| # because I did not want to install anything. | |
| # | |
| # Copyright (C) 2009-2014 Torsten Becker <[email protected]> | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining | |
| # a copy of this software and associated documentation files (the | |
| # "Software"), to deal in the Software without restriction, including | |
| # without limitation the rights to use, copy, modify, merge, publish, |
brew update
brew install libxml2 libxslt
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz tar xvfz libiconv-1.13.1.tar.gz cd libiconv-1.13.1 ./configure --prefix=/usr/local/Cellar/libiconv/1.13.1 make sudo make install
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| cmd = %q[echo '3...'; sleep 1; | |
| echo '2...'; sleep 1; | |
| echo '1...'; sleep 1; | |
| echo 'Liftoff!'] | |
| puts '------ beginning command ------' | |
| output_log = [] | |
| IO.popen(cmd).each do |line| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # blog post: http://blog.slashpoundbang.com/post/1455548868/memcachemodel-make-any-ruby-object-that-persists-in | |
| # No transactions or exceptions (yet). | |
| module MemcacheModel | |
| def self.included(base) | |
| base.class_eval do | |
| extend ActiveModel::Naming | |
| extend ActiveModel::Translation | |
| extend ActiveModel::Callbacks | |
| extend MemcacheModel::ClassMethods |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unless File.exist?('Gemfile') | |
| File.write('Gemfile', <<-GEMFILE) | |
| source 'https://rubygems.org' | |
| gem 'rails', path: '~/code/rails' | |
| gem 'arel', github: 'rails/arel' | |
| gem 'rack', github: 'rack/rack' | |
| gem 'i18n', github: 'svenfuchs/i18n' | |
| GEMFILE | |
| system 'bundle' |