Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry session
Debugger
#!/bin/bash | |
# Chrome Refresh | |
# | |
# Simple applescript browser reloader for Google Chrome. It will either open a | |
# new tab with the url passed in as an argument, refresh an existing tab, or open | |
# a file from your current working directory. | |
# | |
# Link this up with watchr to auto-refresh browser windows when you save files | |
# or bind it in vim, textmate etc. |
Feature: User Reviews // poor feature, needs improvement | |
Scenario: As a user leaving a review for my property //need to capture validation for form as whole, leave out capy stuff | |
Given I am on the review page | |
and I provide name, email address, phone number, rating from 1 to 5, optional review | |
When I press submit | |
Then I must select a captcha associated with my phone number and property | |
When I select the captcha representing my property | |
and the captcha validates | |
Then I will be redirected to the thank you page |
// Application Javascript - see https://github.com/lfender6445/google_places for full example | |
var autocomplete, input, address = {}; | |
$(document).ready(function(){ | |
input = $("#searchBox"); | |
$("#searchBox").clearOnFocus(); | |
$('form').submit(function(){ return false; }); | |
}); | |
var init = function(){ |
git rev-parse --abbrev-ref HEAD | egrep -o '\d+'| head -n 1 | tr -d '\n' | pbcopy |
var start, elapsed; | |
var load_times= []; | |
var init = function(){ | |
$('body').bind('finished', function(){ | |
elapsed = new Date() - start; | |
load_times.push(elapsed); | |
console.log("Elapsed time: " + elapsed); | |
}); | |
benchmark(); |
query_to_hash = function() { | |
var j, q; | |
q = window.location.search.replace(/\?/, "").split("&"); | |
j = {}; | |
$.each(q, function(i, arr) { | |
arr = arr.split('='); | |
return j[arr[0]] = arr[1]; | |
}); | |
return j; | |
} |
subject = {} | |
describe 'Main', -> | |
beforeAll = false | |
beforeEach -> | |
return if (beforeAll) | |
beforeAll = true; | |
require ['shared/main'], (main) -> subject = main |
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
<template name='video'> | |
<p align="center"><input type="button" id="share_screen" value="Share screen"/></p> | |
<p align="center"><video id="video" autoplay='autoplay'></video></p> | |
<script language="javascript"> | |
navigator.getUserMedia = navigator.webkitGetUserMedia || navigator.getUserMedia; | |
$('#share_screen').click(function() { | |
navigator.getUserMedia({ | |
audio: false, | |
video: { |
syslogd is a daemon/background process that logs and generates messages from the system. if this is eating up your CPU, you can find the offending process and kill it.
Open up terminal and run tail -f /var/log/system.log
. You may see some output like this, but it will be very different for you machine:
Jun 12 11:17:08 lfender-mbp kernel[0]: *** kernel exceeded 500 log message per second limit - remaining messages this second discarded ***
Jun 12 11:17:09 lfender-mbp kernel[0]: Data/Stack execution not permitted: ruby[pid 72771] at virtual address 0x7fbd9c078000, protections were read-write