This file contains 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
# RSpec 2.0 syntax Cheet Sheet by http://ApproachE.com | |
# 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") |
This file contains 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
#!/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://github.com/railscasts/#{repo.name}" | |
end | |
end |
This file contains 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 'robots_txt_generator' | |
AppName::Application.routes.draw do | |
[snip] | |
match '/robots.txt' => RobotsTxtGenerator | |
end | |
class RobotsTxtGenerator | |
# Disallow everything for all other environments. |
This file contains 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
Please :+1: this gist if you're not going to make the http://talks.ruby.org.nz/2014/tanks-guns-rrobots/ 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 ;) | |
Thanks! |
This file contains 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
# forked from http://refinerycms.com/t/edge | |
require 'rbconfig' | |
# We want to ensure that you have an ExecJS runtime available! | |
begin | |
require 'execjs' | |
rescue LoadError | |
abort "ExecJS is not installed. Please re-start the installer after running:\ngem install execjs" | |
end |
This file contains 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
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 |
This file contains 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
#!/bin/bash | |
# log into your server | |
ssh root@[server ipaddress] | |
# change root password | |
passwd | |
# update all packages and operating system | |
apt-get update && apt-get --yes upgrade |
This file contains 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
live_loop :flibble do | |
sample :ambi_choir, rate: 0.3 | |
sample :bd_haus, rate: 1 | |
sleep 1 | |
end |
This file contains 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
<template> | |
<div> | |
<vue-ckeditor | |
v-model="content" | |
:key="myKey" | |
:id="myKey" | |
:config="config" /> | |
<button @click="updateKey">Update Key</button> | |
<span :key="blah['id']" v-for="blah in instances"> | |
{{ blah["id"] }} |
This file contains 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/log/apache2/*.log { | |
daily | |
missingok | |
rotate 14 | |
compress | |
delaycompress | |
notifempty | |
create 640 root adm | |
sharedscripts | |
postrotate |