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
<!DOCTYPE html> | |
<!--[if lt IE 7 ]><html lang="en" class="no-js ie ie6"><![endif]--> | |
<!--[if IE 7 ]><html lang="en" class="no-js ie ie7"><![endif]--> | |
<!--[if IE 8 ]><html lang="en" class="no-js ie ie8"><![endif]--> | |
<!--[if IE 9 ]><html lang="en" class="no-js ie ie9"><![endif]--> | |
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]--> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> |
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
@media (min--moz-device-pixel-ratio: 1.5), | |
(-o-min-device-pixel-ratio: 3/2), | |
(-webkit-min-device-pixel-ratio: 1.5), | |
(min-device-pixel-ratio: 1.5), | |
(min-resolution: 1.5dppx) { | |
/* "retina" styles */ | |
} |
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
scope :errors, -> { where(http_status: 404) } | |
scope :archives, -> { where(http_status: 410) } | |
scope :redirects, -> { where(http_status: 301) } | |
scope :other, -> { where('http_status NOT IN (?)', [404, 410, 301]) } | |
def self.aggregated | |
scoped.select('hits.path, sum(hits.count) as count, hits.http_status, hits.host_id').group(:path_hash, :http_status) | |
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
@wip @javascript | |
Scenario: Hits exist and can be filtered by error | |
And I click the link "Errors" | |
And I wait until a graph is visible | |
Then I should see all hits with an error status for the Attorney General's office in descending count order | |
And an errors graph showing two dates and a red trend line | |
When /^I wait until a graph is visible$/ do | |
find('.js-hits-graph svg') | |
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
#!/usr/bin/ruby | |
# Convert Sifttter logs into markdown files, one per day <http://paulrhayes.com> | |
# Based on Sifttter: An IFTTT-to-Day One Logger by Craig Eley 2014 <http://craigeley.com> | |
# Based on tp-dailylog.rb by Brett Terpstra 2012 <http://brettterpstra.com> | |
# | |
# Notes: | |
# * Uses `mdfind` to locate a specific folder of IFTTT-generated text files | |
# * The location of your folder should be hardcoded in line 23 | |
# * Scans leading timestamps in each line matching formatted_date's date | |
# * Does not alter text files in any way |
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/ruby | |
# Convert an exported CSV of tweets into a SIFTTTER format | |
# Export from https://twitter.com/settings/account | |
# SIFTTTER: http://craigeley.com/post/72565974459/sifttter-an-ifttt-to-day-one-logger | |
require 'time' | |
require 'erb' | |
require 'date' | |
require 'csv' |
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/ruby | |
# Convert an exported TSV of scrobbles into a SIFTTTER format | |
# Export from http://www.last.fm/settings/dataexporter | |
# SIFTTTER: http://craigeley.com/post/72565974459/sifttter-an-ifttt-to-day-one-logger | |
require 'time' | |
require 'erb' | |
require 'date' | |
require 'csv' |
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/ruby | |
# Convert an RSS of Foursquare checkins into a SIFTTTER format | |
# Find feed at https://foursquare.com/feeds/ | |
# eg https://feeds.foursquare.com/history/YOUR_FEED_HERE.rss?count=COUNT | |
# SIFTTTER: http://craigeley.com/post/72565974459/sifttter-an-ifttt-to-day-one-logger | |
require 'rubygems' | |
require 'simple-rss' | |
require 'open-uri' |
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
# Static IP for NFS and DNS | |
config.vm.network :private_network, :ip => "10.1.1.250" | |
config.vm.provider :virtualbox do |vm, override| | |
override.vm.synced_folder "~/some/directory", "/some/directory/on/vm", :nfs => true | |
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
# Replace any brackets with real values | |
# Try to ssh in to DREAMHOST (ensure it no longer asks for a PW); you may want to restart Terminal | |
ssh [user]@[host] | |
cd ~ | |
mkdir [mydomain_com].git | |
cd [mydomain_com].git | |
git init --bare | |
vi hooks/post-receive | |
# Enter the code from the "post-receive" file (in this gist); save + quit |
OlderNewer