Skip to content

Instantly share code, notes, and snippets.

View Sufuninja's full-sized avatar

William Campbell Sufuninja

  • Tax Advisors Group, LLC
  • Texas
View GitHub Profile
@Sufuninja
Sufuninja / IntroducingMichaelBlackard.md
Last active August 29, 2015 14:26
Lesson_1-makerPrep

#Introducing Michael Blackard!

Click here to see Michael's friends

##Bio Q&A

Q. What did you do before comming to MakerPrep?

A. I worked at Blizzard for seven years in customer service.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf_8">
<title><Will Campbell/#myPage></title>
<!--iframe showing my blog and link atributes-->
<style type="text/css">
iframe {
position: bottom;
var userTable = {JOHN: "PIZZA", SUE: "LADY", DANNY: "SCIENCE"}
var userName
var password
function _getName() {
userName = prompt("Login:").toUpperCase();
};
function _getPassword() {
password = prompt("Login:").toUpperCase();
@Sufuninja
Sufuninja / sort.js
Last active August 30, 2015 23:42
Practice functions. A basic rewriting of the .sort() method in JavaScript
/* This is my version of sort. It is cluncky and took me far too
long to complete. But now it works!...Thanks to splice().*/
function sort(array){
var currentLargest = array[0];
// store sorted values to be itterated though if item is < currentLargest
var tempArray = [];
/* Updated final array to be returned. I was not sure if trying to itterate through,
tempArray while changing it, would cause unpredictable results so I tried this.*/
var finalArray = [];
// Convert UNIX timestamp to local time
function convertTimestamp(timestamp) {
var d = new Date(timestamp * 1000), // Convert the passed timestamp to milliseconds
yyyy = d.getFullYear(),
mm = ('0' + (d.getMonth() + 1)).slice(-2), // Months are zero based. Add leading 0.
dd = ('0' + d.getDate()).slice(-2), // Add leading 0.
hh = d.getHours(),
h = hh,
min = ('0' + d.getMinutes()).slice(-2), // Add leading 0.
@Sufuninja
Sufuninja / fallthrough.php
Created April 19, 2016 20:14 — forked from CodeupInstructors/fallthrough.php
An example of using switch/case fall through and continue to build a simple comparison script
<?php
$values = array(
array(7, 7),
array(20, 52),
array('stuff', 'junk'),
array('alpha', 'Beta'),
array('abcdef', false),
array(44.2, 7.9),
array(false, false),
<?php
// Tutorial from http://256cats.com/how-to-extract-data-from-github-api-php-tutorial/
require_once 'vendor/autoload.php';
use Milo\Github; //https://github.com/milo/github-api/
header('Content-Type: application/json');
$api = new Github\Api;
@Sufuninja
Sufuninja / active-page.js
Created April 29, 2016 16:22
Sets page link to active by grabbing current page url using jQuery.
$(document).ready(function(){
"use strict"
var url = window.location.pathname;
var filename = url.substring(url.lastIndexOf('/')+1);
// lose php
var whichPage = filename.substring(0, filename.length - 4);
console.log(whichPage);
@Sufuninja
Sufuninja / Useful-Keyboard-Shortcuts.md
Last active July 18, 2016 21:26
Shortcuts for mac, sublime and command line bash.

Keyboard Shortcuts

Drill cli commands and keyboard shortcuts so that they become muscle memory. With a few key-presses, we can navigate and execute commands wherever we want on our system. As a developer, your keyboard is your instrument. It's the interface between your mind and body. Developers cast spells with a few key-presses. Wizards flourish their wands and use magic words to execute their commands; Developers use keyboard commands to reach across space (file systems) and time (with version control like git). Developers conjure things into existence and alter them with a few key-presses. Illusionists use elaborate tricks and deception to do the same thing...


#Geeks Who Drink Pub Trivia

##What is this? As described by their website (linked above), Geeks Who Drink is an organization that hosts quizzes around the country every day of the week.

##Place/Time ###South Town 101, 101 Pereida, 7PM-9PM, Mondays/Thursdays

###Next time we're going is Thursday, July 28. We try to go weekly and we'll keep this updated so bookmark this page to keep up with the schedule!