Skip to content

Instantly share code, notes, and snippets.

View voxdei's full-sized avatar

Guillaume Petit voxdei

  • Cuers, France
View GitHub Profile
@stungeye
stungeye / instructions.md
Created February 28, 2017 19:37
Ensuring That The Rails Server Auto-Reloads Files When Using Vagrant

When using Rails by way of a shared Vagrant folder we need to edit one config file to ensure that the Rails server works properly.

After creating a new Rails application (but before starting the Rails server) the following file in a text editor:

config/environments/development.rb

Change the second last line in this file (line 53) from:

config.file_watcher = ActiveSupport::EventedFileUpdateChecker

@wbotelhos
wbotelhos / nokogiri.sh
Last active February 6, 2020 14:09
ERROR: cannot discover where libxml2 is located on your system. please make sure `pkg-config` is installed.
xcode-select --install
gem install nokogiri
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

Fibur

Fibur is a library that allows concurrency during Ruby I/O operations without needing to make use of callback systems. Traditionally in Ruby, to achieve concurrency during blocking I/O operations, programmers would make use of Fibers and callbacks. Fibur eliminates the need for wrapping your I/O calls with Fibers and a callback. It allows you to write your blocking I/O calls the way you normally would, and still have concurrent execution during those I/O calls.

Example

Say you have a method that fetches data from a network resource:

@brentertz
brentertz / rvm2rbenv.txt
Created November 21, 2011 23:00
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=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')