Skip to content

Instantly share code, notes, and snippets.

Brian Hedberg gemfarmer

Block or report user

Report or block gemfarmer

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
@gemfarmer
gemfarmer / image_checker.rb
Last active Mar 28, 2017
File for checking if images are being used in a site. Best for static sites with build directories
View image_checker.rb
# Find this on Github here: https://gist.github.com/gemfarmer/f3f2e35663b96cd3fa8d90b49e6216a0
require 'colorator' # Comment this out to run the script without colorator
built_path = '_site'
directory_name = 'tmp'
unique_path = 'check_images'
image_path = 'assets/img'
use_relative = false
ignore_removable = false
remove_all = false
@gemfarmer
gemfarmer / jekyll-oembed
Created Feb 22, 2017
An OEmbed liquid tag for Jekyll
View jekyll-oembed
##
# OEmbed Liquid Tag for Jekyll
# - requires https://github.com/judofyr/ruby-oembed/
#
# Copyright 2011 Tammo van Lessen
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@gemfarmer
gemfarmer / Heading accessibility script
Created Jan 20, 2017
Type in the developer tools console to get a list of the headings on a given webpage
View Heading accessibility script
for (var i = 0, headings = $$('h1,h2,h3,h4,h5,h6'); i < headings.length; i++)
console.log(headings[i].textContent.trim() + " " + headings[i].tagName, headings[i]);
View _data-federal_county_production-CA.yml.diff
diff --git a/_data/federal_county_production/CA.yml b/_data/federal_county_production/CA.yml
index 1b740e1..34496b3 100644
--- a/_data/federal_county_production/CA.yml
+++ b/_data/federal_county_production/CA.yml
@@ -198,16 +198,16 @@
name: Geothermal
units: 'Electrical Generation, Thousands of Pounds'
volume:
- '2006': 37899363
- '2007': 35201153
View Makefile.diff
diff --git a/Makefile b/Makefile
index c59862e..5a9a21f 100644
--- a/Makefile
+++ b/Makefile
@@ -205,8 +205,7 @@ data/state_self_employment.yml:
FROM self_employment \
WHERE \
region IS NOT NULL AND \
- region != 'US' AND \
- jobs > 0 \
View Makefile.diff
diff --git a/Makefile b/Makefile
index c59862e..417d10c 100644
--- a/Makefile
+++ b/Makefile
@@ -205,8 +205,7 @@ data/state_self_employment.yml:
FROM self_employment \
WHERE \
region IS NOT NULL AND \
- region != 'US' AND \
- jobs > 0 \
View _data-federal_county_production-AK.yml.diff
diff --git a/_data/federal_county_production/AK.yml b/_data/federal_county_production/AK.yml
index 52ef59a..fb17897 100644
--- a/_data/federal_county_production/AK.yml
+++ b/_data/federal_county_production/AK.yml
@@ -1,11 +1,24 @@
'2122':
name: Kenai Peninsula Borough
products:
+ Gas (mcf):
+ name: Gas
View _data-federal_county_production-AK.yml.diff
diff --git a/_data/federal_county_production/AK.yml b/_data/federal_county_production/AK.yml
index 52ef59a..fb17897 100644
--- a/_data/federal_county_production/AK.yml
+++ b/_data/federal_county_production/AK.yml
@@ -1,11 +1,24 @@
'2122':
name: Kenai Peninsula Borough
products:
+ Gas (mcf):
+ name: Gas
View rails server issue
➜ Athlead git:(master) ✗ rails server
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /Users/brianhedberg/.rbenv/versions/2.0.0-p481/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
[--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile
-B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install
View gist:6aacf3f197331da19f4e
s = angular.element($0).scope();
You can’t perform that action at this time.