Skip to content

Instantly share code, notes, and snippets.

def create_issue_through_ui(issue_name)
wait_until_scope_available '.new-issue #new-issue'
link = page.find :css, '.new-issue #new-issue'
link.click
wait_until_scope_available '#edit-issue-title-form input.issue-title-input'
input = page.find :css, '#edit-issue-title-form input.issue-title-input'
input.set issue_name
# config/routes.rb
Threads::Application.routes.draw do
#...existing stuff
resources :topics, only: [:index, :create, :show] do
resources :posts, only: [:index, :create, :show]
end
resources :settings, only: [:index]
@mykecameron
mykecameron / clientBlaster.js
Created August 21, 2013 15:44
Snippet that just clicks on task completion boxes
function blast(limit, delay) {
if(!limit) { limit = 1000; }
if(!delay) { delay = 500; }
var checkboxes = $('ul.tasks input[type="checkbox"]').toArray();
(function clickLoop(limit, checkboxes, delay) {
setTimeout(function() {
var checkbox = checkboxes.pop();
checkbox.click();
# Recomend limit of 10000 and 6 threads
class Blaster
def self.continuous(task, limit, number_threads)
i = 0
threads = []
number_threads.times do
threads << Thread.new do
while true do
blast(task, i)
<% # assuming the times are stored in @time1 %>
<script>
$(document).ready(function(){
date = new Date(<%= @time1.iso8601 %>);
$('.my_timezone_container').html(date.toString());
});
// or maybe use moment
$(document).ready(function(){
> git commit -m "DRYed up retrieval / caching of visible patients" ~/Projects/IoraHealth 1.9.2 (mc-recently_accessed_patient_list) ✗
Please remove a stray 'p' statement, then `git add` again.
> git diff --cached ~/Projects/IoraHealth 1.9.2 (mc-recently_accessed_patient_list) ✗
diff --git a/app/controllers/admin/dashboards_controller.rb b/app/controllers/admin/dashboards_controller.rb
index 2288a3b..5166731 100644
--- a/app/controllers/admin/dashboards_controller.rb
+++ b/app/controllers/admin/dashboards_controller.rb
@@ -1,10 +1,8 @@
class Admin::DashboardsController < Admin::Controller
def show
@mykecameron
mykecameron / test
Created December 7, 2011 20:48
sagamore agent test script
#!/usr/bin/env ruby
HOST = "http://192.168.2.139:8001"
require 'rubygems'
require 'json'
require 'uuidtools'
require 'typhoeus'
class Test
def can_foo?
respond_to?(:foo)
end
private
def foo;end
end
In The Pink
A Lilly Pulitzer Via Shop
Boston
**************** TICKET ****************
09/17/2010 - 12:36 PM
Ticket #: 1303
12345 MY REALLY REALLY REALLY 123.99
REALLY REALLY LONG DESC
RIPTION