Skip to content

Instantly share code, notes, and snippets.

View ericorruption's full-sized avatar
🎵

Eric Quanz ericorruption

🎵
View GitHub Profile
@ericorruption
ericorruption / lotr.md
Last active July 12, 2016 16:07
War of the ring - Brief summary

WAR OF THE RING

General concepts

Army (group of army units inside a single region)

  • regular
  • elite

maximum of 10 units per army, or 5 inside a stronghold under siege.

Leaders

@ericorruption
ericorruption / style.css
Created January 18, 2016 12:53
simple custom checkboxes / radios (ie9+)
input[type=checkbox] {display: none;}
input[type=checkbox] + label:before {
content: "";
border: 1px solid #000;
font-size: 11px;
line-height: 10px;
margin: 0 5px 0 0;
height: 10px;
width: 10px;
@ericorruption
ericorruption / custom-select.scss
Created January 28, 2016 11:30
Custom select
.o-select {
overflow: hidden;
// add custom styles here
select {
padding: 5px 8px;
width: 130%;
border: none;
box-shadow: none;
background: transparent;
@ericorruption
ericorruption / loader.js
Created January 28, 2016 19:27
Garber-Irish DOM-Based module loading
var APP = {
common: {
init: function() {
// application-wide code
}
}
};
window.UTIL = {
@ericorruption
ericorruption / _core.scss
Created February 20, 2016 19:34
Quick custom WP admin
html {
}
a {
}
.wp-core-ui .button-primary {
@ericorruption
ericorruption / composer.json
Created February 20, 2016 19:39
Useful WP scripts to be installed on bedrock
"require": {
"wpackagist-plugin/admin-menu-editor": "^1.5",
"wpackagist-plugin/wck-custom-fields-and-custom-post-types-creator": "^1.1",
"wpackagist-plugin/wordpress-seo": "^3.0",
"roots/wp-stage-switcher": "^1.0",
"wpackagist-plugin/advanced-excerpt": "^4.2"
}
@ericorruption
ericorruption / index.js
Created April 5, 2016 18:24
largest prime factor calculator (euler project challenges)
// The prime factors of 13195 are 5, 7, 13 and 29.
// What is the largest prime factor of the number 600851475143?
// 13195 / 5 = 2639
// 2639 / 7 = 377
// 377 / 13 = 29
// a prime number is a number that is divisible only by itself (and 1)
var target = 600851475143;
@ericorruption
ericorruption / router.js
Created June 15, 2016 19:07
very barebones router to load specific es6 modules when the page loads.
'use strict';
const path = location.pathname;
function initialize() {
switch(path) {
case 'path':
// load module here
break;
}
@ericorruption
ericorruption / _scope.scss
Created June 15, 2016 20:06
scope-specific styles
// This class is used as wrapper for user-generated content.
.c-scope {
h2 {
}
p {
}
@ericorruption
ericorruption / wp-config.php
Created July 29, 2016 17:34
Wordpress: Forcing site url and home on wp-config.php
define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . ':8888');
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME'] . ':8888');