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
| # See https://gist.github.com/nanki/1336545 | |
| require 'ffi' | |
| module FFI::Ruby | |
| class Value | |
| class << self | |
| extend ::FFI::Library | |
| ffi_lib 'ruby' |
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 | |
| # ============================================================================= | |
| # Quick proof-of-concept of an FFI-based binding_of_caller (no compiling!) | |
| # | |
| # Author: Steve Shreeve <steve.shreeve@gmail.com> | |
| # Basis: binding_of_caller and ffi gems | |
| # Date: 28 May 2015 | |
| # | |
| # Legal: MIT License |
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 bash | |
| watch=/tmp/watch | |
| ready=/tmp/ready | |
| rm -f $watch $ready | |
| mkfifo $watch | |
| # reap all on exit | |
| trap "exit" INT TERM |
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
| # RESTful API | |
| # | |
| # +--------+-------------------+---------+---------+----------+-----------+ | |
| # | METHOD PATH | ACTION | PAYLOAD | TEMPLATE | REDIRECT | | |
| # + -------+-------------------+---------+---------+----------+-----------| | |
| # | GET | /orders | index | | index | | | |
| # | GET | /orders/new | new | | edit | | | |
| # | GET | /orders/4;edit | edit | | edit | | | |
| # | GET | /orders/4 | show | | show | | | |
| # + -------+-------------------+---------+---------+----------+-----------+ |
NewerOlder