Skip to content

Instantly share code, notes, and snippets.

Patrick Davey patrickdavey

Block or report user

Report or block patrickdavey

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
patrickdavey / App.vue
Created Mar 6, 2019
simple app to show destroy on vue-ckeditor2
View App.vue
:config="config" />
<button @click="updateKey">Update Key</button>
<span :key="blah['id']" v-for="blah in instances">
{{ blah["id"] }}
View sonic_pi_test.rb
live_loop :flibble do
sample :ambi_choir, rate: 0.3
sample :bd_haus, rate: 1
sleep 1
View Ubuntu-1404-64bit-Rails-Apache-Postgres
# log into your server
ssh root@[server ipaddress]
# change root password
# update all packages and operating system
apt-get update && apt-get --yes upgrade
View gist:d0c63d1e69d9ee9f45ec
ETHON: Libcurl initialized
/Users/patrickdavey/.rvm/gems/ruby-2.2.1/gems/ethon-0.7.3/lib/ethon/easy/operations.rb:23: [BUG] Segmentation fault at 0x00000000000110
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin13]
-- Crash Report log information --------------------------------------------
See Crash Report log file under the one of following:
* ~/Library/Logs/CrashReporter
* /Library/Logs/CrashReporter
* ~/Library/Logs/DiagnosticReports
* /Library/Logs/DiagnosticReports
patrickdavey / refinery_edge_bootstrap
Last active Aug 29, 2015
Applies bootstrap3 and some sensible defaults for heroku
View refinery_edge_bootstrap
# forked from
require 'rbconfig'
# We want to ensure that you have an ExecJS runtime available!
require 'execjs'
rescue LoadError
abort "ExecJS is not installed. Please re-start the installer after running:\ngem install execjs"
patrickdavey / gist:10216075
Last active Aug 29, 2015
Interested in Livestream / VideoCast / Hangout / ... of RRobots #battlearubyist
View gist:10216075
Please :+1: this gist if you're not going to make the Christchurch Ruby talk in person but are keen to submit a robot.
We're not sure whether we'll get organised in time, the meetup is happening on Thursday 17th April at 19:00 New Zealand time.. if we get enough +1's + entries we'll be more motivated ;)
patrickdavey / gist:6929052
Created Oct 11, 2013
simple dynamic robots.txt
View gist:6929052
require 'robots_txt_generator'
AppName::Application.routes.draw do
match '/robots.txt' => RobotsTxtGenerator
class RobotsTxtGenerator
# Disallow everything for all other environments.
patrickdavey / gist:5809735
Created Jun 18, 2013
script to clone railscasts episodes
View gist:5809735
#!/usr/bin/env ruby
require "rubygems"
require "octokit" # gem install octokit
1.upto(5) do |page|
Octokit.repositories("railscasts", page: page, per_page: 100).each do |repo|
system "git clone git://{}"
patrickdavey / rspec-syntax-cheat-sheet.rb
Created Oct 26, 2012 — forked from dnagir/rspec-syntax-cheat-sheet.rb
RSpec 2 syntax cheat sheet by example
View rspec-syntax-cheat-sheet.rb
# RSpec 2.0 syntax Cheet Sheet by
# defining spec within a module will automatically pick Player::MovieList as a 'subject' (see below)
module Player
describe MovieList, "with optional description" do
it "is pending example, so that you can write ones quickly"
it "is already working example that we want to suspend from failing temporarily" do
pending("working on another feature that temporarily breaks this one")
You can’t perform that action at this time.