Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
# hpHosts - Ad and Tracking servers only
#
# The following are hosts in the hpHosts database with the ATS classification ONLY.
# This file will NOT protect you against malicious domains
#
127.0.0.1 localhost #IPv4 localhost
::1 localhost #IPv6 localhost
#
# AD SERVERS START HERE
#
@kevincolten
kevincolten / index.html
Created May 30, 2017 00:39
React Example
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Welcome</title>
</head>
<body>
<div id="welcome">
</div>
@kevincolten
kevincolten / failingTerm.sql
Last active April 27, 2017 18:53
Campus Manager Queries
SELECT
weighted.first_name,
weighted.last_name,
weighted.phone,
weighted.username,
weighted.term,
weighted.course,
weighted.city,
ROUND(SUM(weighted.score), 0) as score
FROM (
@kevincolten
kevincolten / styleguide.md
Last active April 8, 2017 15:06
ACA Styleguide

ACA Styleguide - Necessary vs Sugary Syntax

Things we will look for

  • Does it stay consistent across more complex variations
  • Is it visually grep-able for errors
  • Does it translate to other targeted WebDev languages
    • Python
    • PHP
    • Ruby
  • How far is it from the ES5 implementation?
@kevincolten
kevincolten / README.md
Created February 28, 2017 21:11
React in the DOM

In your browser devtools, you can access the React component in the console with window.component

Try typing window.component.setState({ name: 'Kevin' });

@kevincolten
kevincolten / form.html
Created February 23, 2017 02:01
Iframe Post Message
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
</head>
@kevincolten
kevincolten / git_alias.sh
Created January 13, 2017 20:17
Generate bash aliases for git repositories
for f in $(ls ~/github); do alias "$f"="cd ~/github/$f" ; done
@kevincolten
kevincolten / StripePayments.sql
Created November 12, 2016 15:52
All students and their payments
SELECT users.id, users.first_name, users.last_name, users.email, stripe_payments.customer, stripe_payments.source, CAST(SUM(stripe_payments.amount) as FLOAT) / 100
FROM users
JOIN stripe_payments as sp ON INSTR(sp.source, users.email) > 0
JOIN stripe_payments ON users.customer_id = stripe_payments.customer
WHERE stripe_payments.customer != ''
AND sp.customer = ''
GROUP BY users.email;
/* SELECT users.id, users.first_name, users.last_name, users.email, stripe_payments.customer, stripe_payments.source, CAST(SUM(stripe_payments.amount) as FLOAT) / 100
FROM users
@kevincolten
kevincolten / NonAlumni.sql
Created November 7, 2016 21:54
Campus Manager Report Queries
SELECT idn, first_name, last_name, email, phone, COUNT(users.email) as courses
FROM users
INNER JOIN registrations ON users.id = registrations.user_id
GROUP BY users.email
HAVING COUNT(users.email) < 3 AND COUNT(users.email) > 1
ORDER BY courses DESC, cast(idn as Number) ASC;