Skip to content

Instantly share code, notes, and snippets.

View richhollis's full-sized avatar

Richard Hollis richhollis

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>test-vticker</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://sdepold.github.io/jquery-rss/src/jquery.rss.js"></script>
<script src="http://richhollis.github.com/vticker/downloads/jquery.vticker.min.js?v=1.14"></script>
<script>
$(function() {
# an example, showing how to load for rspec and conditionally load for cucumber
# lives in whichever dir you set the other file to load
module ImageStepHelpers
def page_should_contain_image_link_for(image)
page.should have_xpath(%Q(//img[@src="#{image.url}"]))
end
def image_data_from_file(image)
image_file_path = Rails.root.join image.image.path
@richhollis
richhollis / gist:4185765d817b106c3aab
Created August 29, 2014 16:25
Test backbone pubSub event triggers call their expected functions in jasmine spec
class BackbonePubSub
@verifyEvent: (klass, name, methodName, callMethod = "registerEvents") ->
match = false
oldFn = Backbone.pubSub.on # get existing pubSub.on method
class KlassNoConstructor extends klass # extend original class so we can disable constructor
constructor: -> # zap the constructor of the target class
instance = new KlassNoConstructor
Backbone.pubSub.on = (triggerName, method) ->
match = true if triggerName == name and method == instance[methodName] # are we triggering on the right method?
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
150ml.com
15meg4free.com
163.com

Setting up a PositiveSSL Wildcard Certificate from Comodo for Apache with Trusted by Microsoft and Firefox

This gist was greatly helped by the direction in this gist:

https://gist.github.com/bradmontgomery/6487319

Examine your certificate in the browser (Chrome):

  • Click on the padlock
  • Click Connection
@richhollis
richhollis / .fonts.conf
Last active August 29, 2015 14:08 — forked from silv3rm00n/.fonts.conf
Fix rspec and capybara errors
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
@richhollis
richhollis / credits
Created February 22, 2012 12:33
Patched jquery-ui-1.8.16.js for twitter bootstrap 2.0 input autocomplete / typeahead
Credit to the original posters on Stack Overflow that proposed the fix - thanks!
http://stackoverflow.com/questions/9232748/twitter-bootstrap-typeahead-ajax-example
http://stackoverflow.com/users/1205428/bmoers
http://stackoverflow.com/users/379593/el-developer
@richhollis
richhollis / gist:4019391
Created November 5, 2012 18:15
Gist for search issue with sferik / twitter
Twitter::Error::Forbidden: Missing or invalid url parameter
from /home/rich/.rvm/gems/ruby-1.9.2-p320/gems/twitter-4.1.2/lib/twitter/response/raise_error.rb:21:in `on_complete'
from /home/rich/.rvm/gems/ruby-1.9.2-p320/gems/faraday-0.8.4/lib/faraday/response.rb:9:in `block in call'
from /home/rich/.rvm/gems/ruby-1.9.2-p320/gems/faraday-0.8.4/lib/faraday/response.rb:63:in `on_complete'
from /home/rich/.rvm/gems/ruby-1.9.2-p320/gems/faraday-0.8.4/lib/faraday/response.rb:8:in `call'
from /home/rich/.rvm/gems/ruby-1.9.2-p320/gems/faraday-0.8.4/lib/faraday/request/url_encoded.rb:14:in `call'
from /home/rich/.rvm/gems/ruby-1.9.2-p320/gems/faraday-0.8.4/lib/faraday/request/multipart.rb:13:in `call'
from /home/rich/.rvm/gems/ruby-1.9.2-p320/gems/twitter-4.1.2/lib/twitter/request/multipart_with_file.rb:21:in `call'
from /home/rich/.rvm/gems/ruby-1.9.2-p320/gems/faraday-0.8.4/lib/faraday/connection.rb:226:in `run_request'
from /home/rich/.rvm/gems/ruby-1.9.2-p320/gems/twitter-4.1.2/lib/twitter/client.rb:71:in
-----BEGIN CERTIFICATE-----
MIIDNjCCAh6gAwIBAgIBADANBgkqhkiG9w0BAQUFADBBMRMwEQYDVQQDDApyaWNo
aG9sbGlzMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNj
b20wHhcNMTMwNDAyMTEzODA0WhcNMTQwNDAyMTEzODA0WjBBMRMwEQYDVQQDDApy
aWNoaG9sbGlzMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9lueRqZlS9BWQ
KM2Vt8Ajc7goi4mivw+QfuQTbkk3quGuF/ZFrQuyh/N+GXKJmIt/GPoDphVUOBGo
nDMd10NAIdQzHsOzElTAZi85KonMJ8KUG3JTqnomNFjKtxdVSTyi4COSpSemT6Y1
WglANxXyG2PtUOypsMjdDmDrZ0zx0N/+Ovg5lGh862f6rDQDk1EGsdUAa1E7cGGu
FCIBimJ5t/YX86g0+XedXcMeu8neb7zjIb0TaH5p5N/+hRwWh155kt8EsP9Grz7t