Skip to content

Instantly share code, notes, and snippets.

View dwradcliffe's full-sized avatar

David Radcliffe dwradcliffe

View GitHub Profile
@dwradcliffe
dwradcliffe / actual.json
Created March 14, 2019 21:36
expected = xds marshaling to any is enabled,
[
{
"name": "0.0.0.0_80",
"address": {
"socketAddress": {
"address": "0.0.0.0",
"portValue": 80
}
},
"filterChains": [
@dwradcliffe
dwradcliffe / index.html
Created June 20, 2011 12:50
Google Maps Quckstart
<!DOCTYPE html>
<html>
<head>
<title>Google Maps Quickstart</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0px; padding: 0px }
#map_canvas { height: 100% }
</style>
# Overwrite some Asset Tag Helpers to use Sprockets
module ActionView
module Helpers
# Overwrite the javascript_path method to use the 'assets' directory
# instead of the default 'javascripts' (Sprockets will figure it out)
def javascript_path(source, options={})
path = compute_public_path(source, 'assets', options.merge(:ext => 'js'))
options[:body] ? path + "?body=1" : path
end
@dwradcliffe
dwradcliffe / chef.log
Created February 25, 2013 03:53
rubygems dbmaster chef error
** [out :: 33.33.33.12] [2013-02-25T03:27:13+00:00] INFO: Processing service[postgresql] action restart (postgresql::server line 115)
** [out :: 33.33.33.12]
** [out :: 33.33.33.12]
** [out :: 33.33.33.12] ================================================================================
** [out :: 33.33.33.12]
** [out :: 33.33.33.12] Error executing action `restart` on resource 'service[postgresql]'
** [out :: 33.33.33.12]
** [out :: 33.33.33.12] ================================================================================
** [out :: 33.33.33.12]
** [out :: 33.33.33.12]
[19:50:01] <dpickett> hey not sure if it's been reported and I didn't know what the protocol was, but I get errors with the dependency api both locally and when deploying to heroku
[19:50:14] <dpickett> the status site doesn't seem to indicate an awareness of the issue
[19:51:06] --> markstarkman (~markstark@c-68-81-220-27.hsd1.pa.comcast.net) has joined #rubygems
[19:52:56] --> jesser (~jesser@2404:8600:33::3) has joined #rubygems
[19:54:03] <-- jesser (~jesser@2404:8600:33::3) has quit (Read error: Connection reset by peer)
[19:55:04] --> jesser (~jesser@2404:8600:33::3) has joined #rubygems
[19:56:36] <-- markstarkman (~markstark@c-68-81-220-27.hsd1.pa.comcast.net) has quit (Ping timeout: 272 seconds)
[19:58:23] <dpickett> I filed an issue to get clarity on what we should do in these circumstances
[19:58:28] <dpickett> https://github.com/rubygems/rubygems.org/issues/530
[19:58:29] <dwradcliffe> dpickett: Just saw the issue
➜ bundle update --verbose
Updating git://github.com/engageis/activerecord-postgres-hstore.git
Updating https://github.com/gregbell/active_admin.git
Updating https://github.com/jeffp/enumerated_attribute.git
Fetching gem metadata from https://rubygems.org/
Query List: ["rails", "pg", "activerecord-postgres-hstore", "sass-rails", "coffee-rails", "uglifier", "asset_sync", "formtastic", "underscore-rails", "simple_form", "activeadmin", "meta_search", "devise", "haml", "haml-rails", "jquery-rails", "bootstrap-sass", "inherited_resources", "icalendar", "airbrake", "event-calendar", "holidays", "redis", "enumerated_attribute", "paperclip", "aws-sdk", "cancan", "mail_view", "newrelic_rpm", "vpim", "unread", "setler", "dotenv", "twilio-ruby", "rack-rewrite", "resque", "sinatra", "rails_autolink", "gibbon", "mixpanel", "dalli", "pry-rails", "rspec-rails", "faker", "heroku", "rails-erd", "guard", "guard-rspec", "sextant", "brakeman", "mailcatcher", "better_errors", "binding_of_caller", "timecop", "factory_girl_rails", "
{
"id": "rubygems",
"application": {
"production": {
"rails_postgresql_host" : "",
"rails_postgresql_db": "",
"rails_postgresql_user": "",
"rails_postgresql_password": "",
"s3_key": "",
"s3_secret": "",
class Player < ActiveRecord::Base
def salary_valid_for_year? year
send("s#{year}") != 0 && send("status#{year}") != 0 && !send("status#{year}").nil?
end
def salary_for_year year
send("s#{year}")
end
@dwradcliffe
dwradcliffe / myview.js.coffee
Created March 13, 2012 17:04 — forked from NickJosevski/myview.js.coffee
backbone example - serialize form + update on change
window.MyView = Backbone.View.extend({
initialize: ->
_.bindAll(this,'render')
this.template = window.JST["MyView"]
this.model.bind('change', this.render)
render: ->
$(this.el).html(this.template(this.model.toJSON()))
events: {
@dwradcliffe
dwradcliffe / apcurl.sh
Created February 17, 2012 20:54
Quick shell script to print json nicely from curl
#!/bin/bash
curl -# $* | ruby -e "require 'rubygems';require 'json';require 'awesome_print'; ap JSON.parse(STDIN.gets)"