require "spec_helper"
describe ClassName do
# Describe each method on your class.
# Note that the `describe` call limits the scope
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
# app/interactors/admin/automated_tasks.rb | |
class Admin::AutomatedTasks | |
def self.run | |
Oem.all.each do |oem| | |
Admin::SendOemDataDump.run(oem) | |
end | |
end | |
end | |
# app/interactors/admin/send_oem_data_dump.rb |
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 'active_record' | |
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:") | |
ActiveRecord::Schema.define(:version => 1) do | |
create_table :posts do |t| | |
t.string :title | |
t.timestamps | |
end | |
end |
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
# ----------------------------------------------------- | |
# Ruby/Rails Heroku Deployment Script | |
# @author Daniel Berkompas | |
# | |
# After downloading, run `ruby deploy.rb --help` to | |
# get usage instructions. | |
# | |
# MIT License | |
# ----------------------------------------------------- | |
require 'optparse' |
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
def pbcopy(str) | |
IO.popen('pbcopy', 'r+') {|io| io.puts str } | |
output.puts "-- Copy to clipboard --\n#{str}" | |
end | |
Pry.config.commands.command "hiscopy", "History copy to clipboard" do |n| | |
pbcopy _pry_.input_array[n ? n.to_i : -1] | |
end | |
Pry.config.commands.command "copy", "Copy to clipboard" do |str| |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
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
# configuration for osx clipboard support | |
set-option -g default-command "reattach-to-user-namespace -l sh" |
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
var pubsub = {}; | |
(function(q) { | |
var topics = {}, subUid = -1; | |
q.subscribe = function(topic, func) { | |
if (!topics[topic]) { | |
topics[topic] = []; | |
} | |
var token = (++subUid).toString(); | |
topics[topic].push({ | |
token: token, |
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
<html data-ember-extension="1"><head><script type="text/javascript" async="" src="https://d2rcp9ak152ke1.cloudfront.net/assets/javascripts/squatch.min.js"></script><script type="text/javascript" async="" src="https://cdn.heapanalytics.com/js/heap.js"></script><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script> | |
<!-- iOS Home Screen Icons --> | |
<link rel="apple-touch-icon" sizes="57x57" href="/assets/mentor/lead_simple_mark_ios_57.png"> | |
<link rel="apple-touch-icon" sizes="72x72" href="/assets/mentor/lead_simple_mark_ios_72.png"> | |
<link rel="apple-touch-icon" sizes="114x114" href="/assets/mentor/lead_simple_mark_ios_114.png"> | |
<link rel="apple-touch-icon" sizes="144x144" href="/assets/mentor/lead_simple_mark_ios_144.png"> | |
<!-- jQuery --> | |
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script> |
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
ruby-install -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/01-fix-make-clean.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/02-railsbench-gc.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/03-display-more-detailed-stack-trace.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/04-fork-support-for-gc-logging.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/05-track-live-dataset-size.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/06-webrick_204_304_keep_alive_fix.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/07-export-a-few-more-symbols-for-ruby-prof.patch -p https://raw.github.com/skaes/rvm-patchsets/master/patches/ruby/1.9.3/p547/railsexpress/08-thread-variables.patch -p https://raw.g |
OlderNewer