Skip to content

Instantly share code, notes, and snippets.

View wrburgess's full-sized avatar
:shipit:
Shippin'

Randy Burgess wrburgess

:shipit:
Shippin'
View GitHub Profile
@wrburgess
wrburgess / app_display_tools.js
Created February 24, 2017 23:37
Application Display Tools with JavaScript
// JavaScript Techniques for Selectors
var something = document.getElementById("the-id-name");
var something = document.getElementsByTagName("p");
var something = document.getElementsByClassName("class-name");
var something = document.querySelector("#id-name");
var something = document.querySelector(".class-name");
var something = document.querySelector("element");
var something = document.querySelectorAll("p.intro");
@wrburgess
wrburgess / app-boilerplate.html
Last active February 26, 2017 16:53
jquery app template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>jQuery App Template</title>
<!-- Added link to the jQuery Library -->
<script src="https://code.jquery.com/jquery-3.1.1.js"></script>
<!-- Added a link to Bootstrap-->
@wrburgess
wrburgess / scope_examples.html
Created February 18, 2017 02:01
JavaScript Scope Examples
<!DOCTYPE html>
<html>
<head>
<title>Scope Examples</title>
</head>
<body>
<script>
a = "The a variable";
var f = "The f variable";
@wrburgess
wrburgess / js_snippets.js
Last active March 1, 2017 23:55
JS snippets: for-loop, if-then-else, create-object, html-selectors
// for-loop
for (counter = 0; counter < array.length; counter++) {
// do some stuff!
}
// if-then-else
if (x < y) {
// do something
@wrburgess
wrburgess / template.html
Created February 4, 2017 15:23
HTML Template
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title Text</title>
<link rel="stylesheet" href="[PATH or URL]">
</head>
<body>
@wrburgess
wrburgess / collection_check_boxes.html.erb
Created January 30, 2017 21:20 — forked from JoshReedSchramm/collection_check_boxes.html.erb
An example of customizing collection_check_boxes in Rails 4. -- I'm working on converting a rails 3.2 app to Rails 4 and noticed that a couple of helpers from simple_form are now in the Rails core. I wanted to move away from dependencies as much as possible including getting rid of simple_form if possible so I went about converting the old view …
<%= f.collection_check_boxes :venue_ids, Venue.all, :id, :name, checked: Venue.all.map(&:id) do |b| %>
<span>
<%= b.check_box %>
<%= b.label %>
</span>
<% end %>
@wrburgess
wrburgess / heroku_issues.md
Created January 30, 2017 20:38
Heroku Troubleshooting Guide (for the Bootcamp hack)

Heroku Troubleshooting Guide (for the Bootcamp hack)

  • Below is a list of the most common issues that students present when trying to do Heroku deployments.

  • Index.php file or Composer.json is no where to be found: The index.php file is like Heroku's map to your starting HTML file. Once it has that file all other references will work. Often students are completely missing the index.php or composer.json file. Often they have these files in completely different directories without realizing it. These files need to be in the same folder as their starting HTML file. These files also need to be at the highest level of the folder being pushed (i.e. you can't have index.php or composer.json in a sub-folder)

  • Index.php file path is pointing to the wrong file: Often students, just copy and paste the filename you use in the index.php file. They need to make sure the filename matches their HTML filename.

  • Faulty Syntax on Index.php file: Ensure that students have the correct syntax in the In

@wrburgess
wrburgess / new_gist_file.md
Last active February 8, 2017 16:26
Elasticsearch broken from brew

Something does not look right here, we do not use the cluster name as part of the data path anymore. Please remove Elasticsearch:

$ brew remove elasticsearch
$ rm -rf /usr/local/var/elasticsearch
$ rm -rf /usr/local/etc/elasticsearch
and start again:

$ brew install elasticsearch

@wrburgess
wrburgess / exercise.html
Created January 26, 2017 01:59
exercise.html
<!-- Activity 1: Basic HTML Bio -->
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>Activity 1: Basic HTML Bio</title>
</head>
@wrburgess
wrburgess / file_name.txt
Created January 26, 2017 01:43
This is a new gist
new text!