Skip to content

Instantly share code, notes, and snippets.

View carlosipe's full-sized avatar
⛰️
🪂

Carlos I. Peña carlosipe

⛰️
🪂
View GitHub Profile
MayflyNG::MayflyException: IOException: no response from 10.72.108.213:11068 Backtrace: MayflyNG::MayflyException::MayflyException(String const&) MayflyNG::Client::rpc(MayflyNG::RequestMsg&, MayflyNG::ResponseMsg&, bool, CalTransaction&) MayflyNG::Client::internal_update_append_set(MayflyNG::RequestMsg&, MayflyNG::ResponseMsg&, Buffer*, MayflyNG::Context*, bool, CalTransaction&) MayflyNG::Client::handle_request(MayflyNG::Client::RequestMode::RequestType, MayflyNG::RequestMsg&, MayflyNG::ResponseMsg&, Buffer*, MayflyNG::Context*, CalTransaction&) MayflyNG::Client::do_update(Buffer const&, Buffer const&, Buffer*, MayflyNG::Context*, MayflyNG::Context*, int) MayflyNG::Client::update(Buffer const&, Buffer const&, MayflyNG::Context*, int) MayflyNG::Client::update(String const&, Buffer const&, MayflyNG::Context*, int) Merchant::Checkout::CheckoutSessionPBMayfly::serialize_and_insert(boost::shared_ptr, int, Merchant::Checkout::CheckoutSessionToken&, bool) Merchant::Checkout::CheckoutSessionPBMayfly::update_session_i
@carlosipe
carlosipe / remapkey.sh
Created August 12, 2013 14:21
Remap CapsLock to escape
xmodmap -e 'keycode 0x42=Escape' #remaps the keyboard
sed 's/,,/, ,/g;s/,,/, ,/g' data.csv | column -s, -t
(printf "PERM LINKS OWNER GROUP SIZE MONTH DAY " ; \printf "HH:MM/YEAR NAME\n" ; \ls -l | sed 1d) | column -t
@carlosipe
carlosipe / octopress-steps.sh
Created February 10, 2014 18:44
Octopress steps
git clone git://github.com/imathis/octopress.git octopress
cd octopress
gs init
gs
gem install bundler
bundle
bundle exec rake install
vim Rakefile #edit ssh_user, document_root
echo .gs/ >> .gitignore
git add .
cd /tmp
wget http://download.redis.io/releases/redis-2.8.6.tar.gz
tar xzf redis-2.*
cd redis*
make
sudo make install
cd utils
sudo ./install_server.sh
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
module Helpers
def javascript_tag(pathname)
"<script src='#{asset_url(pathname)}'></script>"
end
def stylesheet_tag(pathname)
"<link href='#{asset_url(pathname)}' rel='stylesheet'>"
end
private
@carlosipe
carlosipe / cache.rb
Last active August 29, 2015 14:08 — forked from alfanick/cache.rb
# Amadeusz Juskowiak <[email protected]> 2012 - MIT License
# 1. Put inside helpers do .. end
# 2. Set CACHE_DIR to somewhere writable and private (like CACHE_DIR=File.dirname(__FILE__) + '/tmp'
# 3. Use it! You can use fragment_expire to remove cache with given name.
#
# Example:
# %h1 foo
# = cache_fragment(:report, 300) do
# - data = get_data_slowly
THE HUGWARE LICENSE
LICENSE
If there is no other license you can do whatever you want with this while you retain the attribution to the author.
HUGS
The author spent time to make this software so please show some gratitude, in any form. A hug, a tweet, a beer on a conference or just a plain old email. Your choice.