Skip to content

Instantly share code, notes, and snippets.

View scrabill's full-sized avatar
🍔
It's always a good time for a cheeseburger

Shannon Crabill scrabill

🍔
It's always a good time for a cheeseburger
View GitHub Profile
# Shannon Crabill - Full Stack Software Engineer
## Contact & Social Links
- Email: shannon.crabill@gmail.com
- Github: https://github.com/scrabill
- Personal Website: http://www.shannoncrabill.com
- Blog: http://www.shannoncrabill.com/blog
- Linkedin: https://www.linkedin.com/in/shannoncrabill/
## Summary
@scrabill
scrabill / moveToEndExample2.js
Created August 10, 2020 20:07
Approaching Problems like a Software Engineer - Example 2
// Example 2
function moveToEnd(array, number) {
if (number > array.length) {
number = number % array.length
}
for ( let i = 0; i < number; i++ ) {
let itemToMove = array.shift()
@scrabill
scrabill / moveToEndExample1.js
Last active August 10, 2020 20:07
Approaching Problems like a Software Engineer - Example 2
// Example 1
function moveToEnd(array, number) {
for ( let i = 0; i < number; i++ ) {
let itemToMove = array.shift()
array.push(itemToMove)
}
# From this...
def create
@order = Order.create(order_params)
if @order.save
redirect_to order_path(@order)
else
render :new
end
end
class User < ApplicationRecord
has_secure_password
has_many :orders
end
class Order < ApplicationRecord
belongs_to :user
has_many :order_items
has_many :menu_items, through: :order_items
end
@scrabill
scrabill / Start.py
Created October 2, 2018 19:04 — forked from h2n0/Start.py
Coding Challenge Code
print("Cambridge April 2015 coding challange submition")
print("By Elliot Lee-Cerrino year 12 student")
table = []
percent = -1
def displayName(index):#Used to format the names, scores and percentages of each studen
global table
name = table[index][0]
EMAIL-GREP-PATTERN
<!-- Please remove all commented out code before using. Visit https://gist.github.com/ccstone/5385334 for more regular expressions available in TextWrangler -->
<!-- \r is line break, \s is non whitespace, \t tab, this looks for table cells and image tags with missing attributes -->
|<td>|<td>\r*?\s*?\t*?<img|(<img\s*(?!.*\r*?.*?\r*?.*?display: ?block.*?\r?))
<!-- image formatting and styles: height, width, block, alt text -->
|<img\s*(?!.*\r*?.*?\r*?.*?height.*?\r?)|<img\s*(?!.*\r*?.*?\r*?.*?width.*?\r?)
<!-- break tag variants -->
|<br/>|<br>
<!-- special characters -->
@scrabill
scrabill / putonglasses.txt
Last active August 21, 2016 02:51 — forked from cheeaun/putonglasses.txt
put on glasses unicode
(•_•)
( •_•)>⌐■-■
(⌐■_■)