Skip to content

Instantly share code, notes, and snippets.

View SinisterMinister's full-sized avatar

Codey Whitt SinisterMinister

  • VisualGuruz
  • Remote
View GitHub Profile
@SinisterMinister
SinisterMinister / dev.conf
Last active December 11, 2015 18:58
dnsmasq setup for osx
# put in /usr/local/etc/dnsmasq.d/
address=/dev/10.1.1.10
@SinisterMinister
SinisterMinister / .bash_profile
Created January 27, 2013 00:27
OSX Terminal color support
# Color Support
export TERM="xterm-color"
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
# Setup SVN's editor
export SVN_EDITOR=nano
@SinisterMinister
SinisterMinister / _test.md
Last active December 14, 2015 00:29
Programming Test
Programming Test

Write a view class that can fetch data in multiple ways (file, web, etc) in different formats (JSON, CSV, etc) and render them in multiple ways (table, unordered lists). Bonus points if you use the following interfaces:

<?php

/**
 * Describes a data interface for use with a renderer to render an output
 */
@SinisterMinister
SinisterMinister / assignment.md
Created March 13, 2013 20:01
Marty's assignment from Codey

Marty's Blog

This is a simple, but thorough assignment for Marty to help him level up in PHP.

Restrictions

  1. No Frameworks or Libraries shall be used in the creation of the blog except for the following:
    • jQuery
    • Moment.js
  • Bootstrap
@SinisterMinister
SinisterMinister / app.js
Created May 3, 2013 15:12
API adapter prototype
/**
* Base API that all adapters will wrap
*/
var BaseApi = (function ($){
// Force strict
"use strict";
/**
* Updates the output div
* @param {string} funcName Name of the function being called

#QUESO BLANCO

###Ingredients:

  • 1 cup Whole milk
  • 1 ¼ lbs. Land o’ Lakes Extra Melt White cheese (or white American)
  • ¼ lb Pepper jack cheese
  • ½ cup Pico de Gallo (see below)
@SinisterMinister
SinisterMinister / homework.md
Last active December 18, 2015 08:59
Marty's Homework

Marty's Homework

Classes and Objects: Lesson 1

Instructions

Make answers to the following problems below using PHP. For now, you can psuedocode the methods with comments, or you can create your own implementations if you feel adventurous. Use any resources you like. Also, one thing I forgot to mention in your lesson: there is a naming convention for things in classes. If a name starts with a single

/**
* Gets the dependent keys of the computed proerpty
* @return {array} Array of dependent keys
*/
ComputedPropertyPrototype.getDependentKeys = function() {
// Create a new container to pass by value
var newArray = [];
// Add the keys to the container
for (var i = this._dependentKeys.length - 1; i >= 0; i--) {
Unit Tests
Internal Caching
✓ Should throw an exception when trying to get a key that doesn't exist
✓ Should set and retrieve a key from the cache
✓ Should delete a key from the cache
Helpers
hasTagType()
✓ Should return the index of an array where a tag type exists
✓ Should return false if the type is not found
mergeTagsWithDefault()
@SinisterMinister
SinisterMinister / q.md
Last active November 12, 2018 06:33
JS Interview questions

Javascript Interview Questions

General interview questions for a front-end JS developer.

Questions

  • What is the spec Javascript implements and what versions of it are you most current with?

  • Does JavaScript support the use of classes?