I hereby claim:
- I am mhenrixon on github.
- I am mhenrixon (https://keybase.io/mhenrixon) on keybase.
- I have a public key whose fingerprint is 8CC8 80A4 ED67 9027 D1FB 0EE7 48CE 83E6 A7B6 5689
To claim this, I am signing this object:
require 'bundler/setup' | |
require 'async/await' | |
require 'async/redis' | |
require 'securerandom' | |
require 'pry' | |
class AsyncAwaitTest | |
include Async::Await | |
db.assets.ensureIndex({"tags.callname": 1, "tags.tags": 1}, {background: true}) | |
// index [['tags.callname', 1, ['tags.tags', 1]], { background: true } | |
db.permalinks.ensureIndex({"linkable_uuid": 1, "_current": 1}, {background: true}) | |
db.matches.ensureIndex({"id": 1, "_id": 1}, {background: true}) | |
db.live_events.ensureIndex({"asset_id": 1, "asset_version": 1, "_id": 1}, {background: true}) | |
db.mediafiles.ensureIndex({"match_id": 1, "filename": 1}, {background: true}) | |
db.users.ensureIndex({"confirmation_token": 1}, {background: true}) | |
db.assets.ensureIndex({"match_id": 1, "created_at": 1}, {background: true}) | |
db.orders.ensureIndex({"customer_id": 1, "order_status": 1}, {background: true}) | |
db.matches.ensureIndex({"sport_id": 1, "name": 1, "starts_at" -1 }, {background: true}) |
import sublime, sublime_plugin | |
import os | |
class DetectFileTypeCommand(sublime_plugin.EventListener): | |
""" Detects current file type if the file's extension isn't conclusive """ | |
""" Modified for Ruby on Rails and Sublime Text 2 """ | |
""" Original pastie here: http://pastie.org/private/kz8gtts0cjcvkec0d4quqa """ | |
def on_load(self, view): | |
filename = view.file_name() |
background do | |
set_omniauth() | |
click_link_or_button 'Sign up with Facebook' | |
end |
I hereby claim:
To claim this, I am signing this object:
version: "2" | |
services: | |
dev: | |
image: ruby:2.3 | |
volumes: | |
- .:/project | |
- ruby2.3-bundle-cache:/usr/local/bundle | |
working_dir: /project |
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
sudo: required | |
language: ruby | |
services: | |
- docker | |
script: | |
- docker-compose run -e TRAVIS=$TRAVIS -e TRAVIS_BRANCH=$TRAVIS_BRANCH -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST rspec | |
- docker-compose run -e TRAVIS=$TRAVIS -e TRAVIS_BRANCH=$TRAVIS_BRANCH -e TRAVIS_JOB_ID=$TRAVIS_JOB_ID -e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST test_app |
$snapins = Get-PSSnapin -Registered | |
$snapins | Add-PSSnapin | |
Get-Module -ListAvailable | Import-Module | |
Get-PSSnapin | Format-Table -autosize PSVersion, Name | |
Get-Module | Format-Table -autosize ModuleType, Name | |
function ff ([string] $glob) { get-childitem -recurse -include $glob } |
# I usually end up with something like below in my code | |
def fetch_something | |
current_something.coll_association.find_by some: 123, other: 'sasd' | |
end | |
# I want to test that the finder gets called with the right arguments | |
it "finds cool_association using the right arguments" do | |
expect(current_something).to receive_message_chain('cool_association.find_by'). | |
with(some: 123, other: 'sasd') { cool_association } | |
end |