Skip to content

Instantly share code, notes, and snippets.

View robzolkos's full-sized avatar

Rob Zolkos robzolkos

View GitHub Profile
@robzolkos
robzolkos / stories.rb
Last active September 8, 2023 21:37
story.rb refactor
# Original code https://twitter.com/robinbortlik/status/1699524286568964440?s=20
# app/controllers/stories.rb
class StoriesController < ApplicationController
before_action :check_authorizationa # this should check and return a 401
def create
story = Story.new(story_params)
if story.save
@robzolkos
robzolkos / curl.sh
Last active October 15, 2020 14:55
nginx action cable error
curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: portal.example.com.au" -H "Origin: https://portal.example.com.au" https://portal.example.com.au/cable
HTTP/1.1 301 Moved Permanently
Server: nginx/1.10.3 (Ubuntu)
Date: Thu, 15 Oct 2020 14:33:10 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Location: https://portal.example.com.au/cable
@robzolkos
robzolkos / Gemfile
Created June 25, 2020 12:25 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@robzolkos
robzolkos / anchor_test.html
Created March 16, 2020 19:35
Anchor Test
<html>
<body>
<a href=“#test”>Test</a>
<br />
<br />
<br />
<br />
<br />
<br />
@robzolkos
robzolkos / mislav gemfile.lock
Created July 10, 2019 18:36
Mislav Gemfile
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.22)
actionpack (= 3.2.22)
mail (~> 2.5.4)
actionpack (3.2.22)
activemodel (= 3.2.22)
activesupport (= 3.2.22)
builder (~> 3.0.0)
@robzolkos
robzolkos / states_hash.json
Created September 23, 2017 12:14 — forked from mshafrir/states_hash.json
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@robzolkos
robzolkos / phantom.sh
Created September 30, 2015 04:22
phantomjs
#!/bin/bash
# Install a custom version 2 of PhantomJS, http://phantomjs.org/
#
# Include in your builds via
# \curl -sSL https://gist.githubusercontent.com/mlocher/f0f731dfa93c82d0fa86/raw/phantomjs2.sh | bash -s
PHANTOMJS_URL="https://s3.amazonaws.com/codeship.io/checkbot/binaries/phantomjs_2.0.1"
CACHED_DOWNLOAD="${HOME}/cache/phantomjs_2.0.1"
# exit on the first error
set -e
Failures:
1) User List Administrator viewing list of users
Failure/Error: case type
NameError:
undefined local variable or method `type' for #<RSpec::Core::ExampleGroup::Nested_1:0x0000010169fe40>
# ./spec/features/users/user_list_spec.rb:23:in `block (2 levels) in <top (required)>'
# -e:1:in `<main>'
2) User List Normal user viewing list of users
@robzolkos
robzolkos / keybase.md
Created March 1, 2014 11:17
keybase.md

Keybase proof

I hereby claim:

  • I am robzolkos on github.
  • I am robzolkos (https://keybase.io/robzolkos) on keybase.
  • I have a public key whose fingerprint is 4A58 CEAF 1236 24E2 DA45 C1EF 42B8 D646 B050 10B6

To claim this, I am signing this object:

- link = "http://www.facebook.com/sharer/sharer.php?s=100&p[url]=#{url_encode('http://google.com')}&p[images][0]=&p[title]=#{url_encode('some title')}&p[summary]=#{url_encode('something something')}"