Skip to content

Instantly share code, notes, and snippets.

View brandoncordell's full-sized avatar

Brandon Cordell brandoncordell

View GitHub Profile
@brandoncordell
brandoncordell / gist:fca1e9aae4eeeb91e244
Last active August 29, 2015 14:04
missing required keys: [:user_id]
# Routes
Prefix Verb URI Pattern Controller#Action
sidekiq_web /sidekiq Sidekiq::Web
root GET / high_voltage/pages#show {:id=>"home"}
user_bank_accounts GET /users/:user_id/bank_accounts(.:format) bank_accounts#index
POST /users/:user_id/bank_accounts(.:format) bank_accounts#create
new_user_bank_account GET /users/:user_id/bank_accounts/new(.:format) bank_accounts#new
edit_user_bank_account GET /users/:user_id/bank_accounts/:id/edit(.:format) bank_accounts#edit
user_bank_account GET /users/:user_id/bank_accounts/:id(.:format) bank_accounts#show
PATCH /users/:user_id/bank_accounts/:id(.:format) bank_accounts#update
Cleaning up...
Removing temporary dir /home/brandon/Code/rhombik-env/build...
Exception:
Traceback (most recent call last):
File "/home/brandon/Code/rhombik-env/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/home/brandon/Code/rhombik-env/local/lib/python2.7/site-packages/pip/commands/install.py", line 302, in run
requirement_set.cleanup_files(bundle=self.bundle)
File "/home/brandon/Code/rhombik-env/local/lib/python2.7/site-packages/pip/req.py", line 1333, in cleanup_files
rmtree(dir)
# Original line
%img.popup-menu-shadow-leftcap{:src=>"../assets/popup-menu-shadow-leftcap.gif", :alt=>''}
# Try this instead
= image_tag 'popup-menu-shadow-leftcap.gif', class: 'popup-menu-shadow-leftcap', alt: ''
/heres a simple div with an id
#my-div This is my cool div
results: <div id="my-div">This is my cool div</div>
/heres a simple div with a class
.my-div This is my cool div
2016-06-08 10:28:07 Debug: Httpful\Response Object
(
[body] => stdClass Object
(
[code] => forbidden
[message] => permission denied
)
[raw_body] => {"code":"forbidden","message":"permission denied"}
[headers] => Httpful\Response\Headers Object
@brandoncordell
brandoncordell / posting-data.json
Last active July 27, 2016 17:30
Posting Data
POST /filed_documents HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
{
"data": {
"type": "filed_documents",
"attributes": {
"admin_id": 1,
"cat_1": 0,
# API key
# Any API key will be required to access the API in production, use the request header
# X-API-KEY: <API Key>
#
# Your API key will be assigned to you from the ATLAS instance
# Filtering data
# You can filter on any field listed under each of the resources
GET /users?filter[lastname]=Smith HTTP/1.1
// http://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Starprinter Test</title>
</head>
<body>
<h1>Welcome page</h1>
require 'json'
require 'nokogiri'
require 'open-uri'
require 'pry'
spells = {}
main_page = Nokogiri::HTML(open('https://www.dnd-spells.com/spells'))
spell_rows = main_page.css('#example tr')
spell_row_number = 0