Skip to content

Instantly share code, notes, and snippets.

View P1xt's full-sized avatar
🏠
Working from home

P1xt P1xt

🏠
Working from home
  • Freelance
  • Minneapolis, MN, USA
View GitHub Profile
@P1xt
P1xt / Grid-of-green-tiles,-with-diagonals-in-red.markdown
Created March 27, 2015 03:51
Grid of green tiles, with diagonals in red

Grid of green tiles, with diagonals in red

Usually you see jQuery pulled in to manipulate the DOM. This is a Proof of Concept, drawing the grid exclusively by dynamically adding DOM elements on page load with JavaScript (using plain JS, no jQuery or other "helpers"). Clicking on a grid element will cause it to disappear, this is accomplished via a click handler which toggles the element's background style off onclick.

A Pen by P1xt on CodePen.

License.

@P1xt
P1xt / index.jade
Created February 1, 2015 21:52
Layout for a quick bootstrap page to drop a Phaser game into
extends layout
block content
h1= title
@P1xt
P1xt / Build your own blog theme
Created January 9, 2015 20:10
Build your own blog theme
Slide 1:
Build your own blog theme
Slide 2:
Now tat you've made an awesome theme for Jeff's blog,
let's see if you can make one on your own,
without any guidance!
Slide 3:
It'll be hard to remember how to do some things,
@P1xt
P1xt / Jeff's Blog 3 - Responsive design & Javascript
Created January 9, 2015 20:02
Jeff's Blog 3 - Responsive design & Javascript
Slide 1:
Jeff's blog
Part 3: Responsive design & Javascript
Slide 2:
Our Mission:
In this lesson, we'll cover three main things:
1. Give the content a responsive design
2. Learn about advance colors
@P1xt
P1xt / Jeff's blog 2 - style the header with CSS
Created January 9, 2015 18:15
Jeff's blog 2 - style the header with CSS
Slide 1
Jeff’s Blog
Part2: Header CSS
Slide 2
Our Mission:
In this less, we’ll cover 3 main things
Add a CSS reset external CSS file
Style the navigation lins
Style the rest of the header
@P1xt
P1xt / multiply.py
Created December 20, 2014 05:11
Multiply in python
def multiply(a, b):
return a*b
@P1xt
P1xt / saylor_resources.js
Last active August 29, 2015 14:06
Saylor's Chemistry textbook is like three kinds of blue-green on blue-green and damn near illegible, this fixes it
// ==UserScript==
// @name saylor resources
// @namespace P1xt
// @description fix the ghastly styling of the chemistry textbook
// @include http://resources.saylor.org/*
// @version 1.003
// @grant none
// ==/UserScript==
function addGlobalStyle(css) {
var head, style;
@P1xt
P1xt / saylor.js
Created September 9, 2014 00:13
Greasemonkey script to shrink the text in the new crazy arsed Saylor redesign down to something usable ... seriously 4em ... w t hell people
// ==UserScript==
// @name saylor
// @namespace P1xt
// @description Fix Saylor font sizing
// @include http://www.saylor.org/
// @include http://www.saylor.org/*
// @version 1
// @grant none
// ==/UserScript==
function addGlobalStyle(css) {
@P1xt
P1xt / roller_coaster.cpp
Created August 8, 2014 21:06
Roller Coaster in c++
#include <iostream>
#include <fstream> // For ifstream
#include <string>
#include <locale>
using namespace std;
int main(int argc, char* argv[]) {
ifstream file;
string line;
file.open(argv[1]);
@P1xt
P1xt / 2.cpp
Created August 6, 2014 18:01
CS107 Unit 1 Assessment Problem 2
int main () {
int climber, floater;
int* blocker = &climber;
int* bomber = new int;
int* builder = new int;
int* basher = builder;
int* miner = blocker;
int* digger = new int;
*digger = *blocker;
/* builder was created with a "new int" assignment,