Skip to content

Instantly share code, notes, and snippets.

Myke Cameron mykecameron

Block or report user

Report or block mykecameron

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View create_issue_and_note_step.rb
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
View viewings idea
# 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 Aug 21, 2013
Snippet that just clicks on task completion boxes
View clientBlaster.js
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();
View Blaster
# 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)
View sample.erb
<% # 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(){
View gist:2911449
> 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 Dec 7, 2011
sagamore agent test script
View test
#!/usr/bin/env ruby
HOST = "http://192.168.2.139:8001"
require 'rubygems'
require 'json'
require 'uuidtools'
require 'typhoeus'
View respond_to? visibility
class Test
def can_foo?
respond_to?(:foo)
end
private
def foo;end
end
View receipt with original price
In The Pink
A Lilly Pulitzer Via Shop
Boston
**************** TICKET ****************
09/17/2010 - 12:36 PM
Ticket #: 1303
View snippet.txt
12345 MY REALLY REALLY REALLY 123.99
REALLY REALLY LONG DESC
RIPTION
You can’t perform that action at this time.