Skip to content

Instantly share code, notes, and snippets.

Joel Richards joelr

Block or report user

Report or block joelr

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
@joelr
joelr / install-comodo-ssl-cert-for-nginx.rst
Created Nov 11, 2016 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@joelr
joelr / gist:ad96329391d36d2325833eeb8230a75d
Created Oct 24, 2016 — forked from timblair/gist:942151
National Rail really is run by a bunch of monkeys...
View gist:ad96329391d36d2325833eeb8230a75d
$ curl --silent -i http://ojp.nationalrail.co.uk/ | grep 'Powered-By'
X-Powered-By: An infinite number of monkeys
View gist:ebe1cefd1f7619a565c6
"--- !ruby/object:MIME::Type\ncontent-type: image/jpeg\nfriendly:\n en: JPEG Image\nencoding: base64\nextensions:\n- jpeg\n- jpg\n- jpe\nreferences:\n- IANA\n- RFC2045\n- RFC2046\nxrefs: !ruby/hash:MIME::Types::Container\n rfc:\n - rfc2045\n - rfc2046\nregistered: true"
@joelr
joelr / LB example.md
Last active Oct 19, 2015
LB example.md
View LB example.md

sort_by=calories&group_by=team&filter[campaign]=au-123,au-456&filter[date_start]=2015-01-01&filter[date_end]=2015-01-01 This should group by team_page_id on the document

[
   {
     team: {
       name: 'Team abc',
       url: 'http://def',
View gist:6fb3ebd47a9ac716cb69
** [out :: 10.21.88.51]
** [out :: 10.21.88.51] WARNING on line 114 of /var/www/apps/supporter/releases/20150205232915/app/assets/stylesheets/shared/_form_fields.css.sass: ".form__field--search" failed to @extend "%padding-r-l".
** [out :: 10.21.88.51] The selector "%padding-r-l" was not found.
** [out :: 10.21.88.51] This will be an error in future releases of Sass.
** [out :: 10.21.88.51] Use "@extend %padding-r-l !optional" if the extend should be able to fail.
** [out :: 10.21.88.51]
** [out :: 10.21.88.51]
** [out :: 10.21.88.51] WARNING on line 114 of /var/www/apps/supporter/releases/20150205232915/app/assets/stylesheets/shared/_form_fields.css.sass: ".form__field--search" failed to @extend "%padding-r-l".
** [out :: 10.21.88.51] The selector "%padding-r-l" was not found.
** [out :: 10.21.88.51] This will be an error in future releases of Sass.
View gist:dda344e690990c1ccd8f
* Stopping Elasticsearch Server 
[ OK ]
--2014-10-24 04:35:37-- https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.1.deb
Resolving download.elasticsearch.org (download.elasticsearch.org)... 107.22.222.16, 54.243.77.158, 54.225.133.195, ...
Connecting to download.elasticsearch.org (download.elasticsearch.org)|107.22.222.16|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 19091206 (18M) [application/x-debian-package]
Saving to: ‘elasticsearch-1.1.1.deb’
View gist:8819936
This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/joel/.rbenv/versions/2.0.0-p247/bin/ruby extconf.rb --with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin13.0.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /Users/joel/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/nokogiri-1.6.1/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0)...
View gist:6220183
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script type='text/javascript'>
$(function() {
$.getJSON('http://api.jo.je/justgiving/jsonp.php?d=Team-Prologis&callback=?', {}, function (data) {
$("#raised-jg").html(data.donations_total);
View gist:5898411
OmniAuth::Strategies::Passport.default_options.client_options.site = 'http://localhost:3009'
@joelr
joelr / gist:4690768
Created Feb 1, 2013
Random purchaser
View gist:4690768
cart = Cart.new
cart.add_product RandomProduct.find
puts cart.total
cart.pay
#Gives me:
$ ruby app.rb
Adding Motion Activated Flashing RGB LED Wheel Lights for Bikes and Cars (2-Pack)
You can’t perform that action at this time.