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
FROM buildpack-deps | |
# Make a user, group, and home folder | |
RUN useradd user -g users -d /home/user -m | |
# Install build and test dependencies for rubinius. | |
# The ruby installed here is only for building and will be purged later. | |
RUN apt-get update && apt-get install -y llvm clang ruby ruby-dev bison procps libedit-dev | |
RUN gem install bundler --no-document |
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
import QtQuick 2.1 | |
Item { | |
id: root | |
Item { | |
id: a | |
property var prop: console.log("a.prop property defined") |
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
# Set build directory to ./build relative to working directory | |
qbs-config preferences.defaultBuildDirectory build | |
# Set build directory to /var/builds/@project (absolute) | |
qbs-config preferences.defaultBuildDirectory /var/builds/@project |
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
class MyDecoratorHandler < YARD::Handlers::Ruby::Base | |
handles method_call(:my_decorator) | |
# my_decorator {meta:'data'}, def foo(a,b,c); end | |
def process | |
args = statement[1] | |
mdef = args[1] | |
metadata = args[0].source.gsub /[\r\n]/, '' | |
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
require 'regexp_parser' | |
require 'pry' | |
require 'pp' | |
regexp = /foo: (?<val>\d+)?\W{0,5}(?<other>\w+)/ | |
filldata = {val: 88.99, other:"dog"} |
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
module A | |
def initialize; super end | |
def self.extended(obj) | |
instance_method(:initialize).bind(obj).call | |
end | |
end | |
Object.new.extend A |
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
class BruteForce | |
extend Enumerable | |
def initialize(size, alphabet) | |
@alphabet = alphabet | |
if size.respond_to?(:min) and size.respond_to?(:max) | |
@start_size = size.min | |
@end_size = size.max |
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
module HappehTheory | |
module SingleCell | |
def gelatin | |
trait | |
end | |
private | |
NewerOlder