Skip to content

Instantly share code, notes, and snippets.

View draffauf's full-sized avatar

David Raffauf draffauf

View GitHub Profile
// Instructions: at codesandbox.io, create a Vanilla JS sandbox,
// and paste this file into index.js
import './styles.css';
const Languages = [
'JavaScript',
'TypeScript',
'Python',
'Ruby',
@draffauf
draffauf / javascript_fundamentals.js
Created January 5, 2020 18:52
JavaScript Fundamentals
//
// Console.log (output)
//
console.log("Basics ---------------------------------------");
//
// Comments
//
@draffauf
draffauf / bowling.txt
Created August 6, 2015 16:40
Bowling Score Feature Request
Dear Sir or Madam,
I write to you today because I am looking for someone to create an application to calculate my bowling score as I am an avid bowler, but write all my scores down on paper. I am looking for a more automated solution and you seem like the best candidate to give me the solution I am looking for.
Here are my requests:
1) Initially, I will provide my last bowling game data in which you can use to setup your data structure.
2) I would like for this data to be printed out in a manner that I am used to seeing when scoring bowling.
3) As a bonus, after you get your calculations correct, I would love for some way for the system to allow me to enter in my scores on each frame I bowl so that I can take this app with me.
@draffauf
draffauf / gist:5632023
Created May 23, 2013 00:45
I was having trouble munging JSON data from a Rails API into a format that Ember would accept. This is what worked for me. I also used the active_model_serializers gem, but I think it was unnecessary for this simple example.
# /app/controllers/api/v1/articles_controller.rb
# ...
def index
@articles = Article.all
respond_to do |format|
format.json { render json: @articles, :callback => params[:callback] }
end
@draffauf
draffauf / .gitignore
Created July 12, 2012 22:05 — forked from redoPop/.gitignore
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your