Skip to content

Instantly share code, notes, and snippets.

Brandon Cordell brandoncordell

Block or report user

Report or block brandoncordell

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
View application.js
// app/javascript/packs/application.js
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
// vendor
brandoncordell / respond_to.rb
Created Dec 14, 2017
respond_to js and json
View respond_to.rb
module Admin
class EcardProgramsController < BaseController
def index
@ecard_programs = EcardProgram.all
def create
@ecard_program =
respond_to do |format|
View gear.rb
#array to check for an actual item location
arr = ["a1","b1","c1","a2", "b2", "c2", "a3", "b3", "c3"]
var = ''
# blank has for locations
locations = {
a1: {},
a2: {},
a3: {},
b1: {},
b2: {},
View parse-dnd-spells-com.rb
require 'json'
require 'nokogiri'
require 'open-uri'
require 'pry'
spells = {}
main_page = Nokogiri::HTML(open(''))
spell_rows = main_page.css('#example tr')
spell_row_number = 0
View starprinter.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>Starprinter Test</title>
<h1>Welcome page</h1>
View .eslintrc.js
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
env: {
browser: true,
View atlas-api.json
# 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
View posting-data.json
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,
View gist:77ab6fe3ea53b140e3e4330a224f6841
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
View gist:992502b52bcc51089ca9
/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
You can’t perform that action at this time.