Skip to content

Instantly share code, notes, and snippets.

View zymtx5g79k's full-sized avatar

zymtx5g79k zymtx5g79k

View GitHub Profile
filter_index = vm.filters.indexOf filter
# frozen_string_literal: true
RSpec.configure do |rspec|
# This config option will be enabled by default on RSpec 4,
# but for reasons of backwards compatibility, you have to
# set it on RSpec 3.
#
# It causes the host group and examples to inherit metadata
# from the shared context.
rspec.shared_context_metadata_behavior = :apply_to_host_groups
contact_faces = ContactFace.where(phone1: phone).or(ContactFace.where(phone2: phone))
let(:book_data) { attributes_for :book }
module M
module ClassMethods
def method_a
raise "should not execute method_a"
end
end
def self.included(base)
base.extend M::ClassMethods
end
#!/usr/bin/env ruby
#define path
$:.unshift File.expand_path("../", __FILE__)
require 'rubygems'
require 'eventmachine'
#Faster
require 'em-http'
'use strict';
app = angular.module('app', [
'ngRoute',
'ngResource',
'templates',
'angularFileUpload'
])
color: Qt.rgba(Qt.random(), Qt.random(), Qt.random(), 1)
Button {
id: button
signal pressAndHold()
Timer {
id: longPressTimer