Skip to content

Instantly share code, notes, and snippets.

View alexgleason's full-sized avatar

Alex Gleason alexgleason

View GitHub Profile

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@alexgleason
alexgleason / pi.vz_exif.php
Last active August 29, 2015 14:11
VZ Exif (Orientation Hack)
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$plugin_info = array(
'pi_name' => 'VZ Exif (Orientation Hack)',
'pi_version' => '1.0.9',
'pi_author' => 'Eli Van Zoeren (hacked by Alex Gleason)',
'pi_author_url' => 'http://elivz.com/',
'pi_description' => 'Extract the Exif information from an image',
1:1 Inway ethay eginningbay Odgay eatedcray ethay eavenhay andway ethay earthway.
1:2 Andway ethay earthway asway ithoutway ormfay, andway oidvay; andway arknessday asway uponway ethay acefay ofway ethay eepday. Andway ethay Iritspay ofway Odgay ovedmay uponway ethay acefay ofway ethay atersway.
1:3 Andway Odgay aidsay, Etlay erethay ebay ightlay: andway erethay asway ightlay.
1:4 Andway Odgay awsay ethay ightlay, atthay itway asway oodgay: andway Odgay ividedday ethay ightlay omfray ethay arknessday.
1:5 Andway Odgay alledcay ethay ightlay Ayday, andway ethay arknessday ehay alledcay Ightnay. Andway ethay eveningway andway ethay orningmay ereway ethay irstfay ayday.
@alexgleason
alexgleason / dev-prod-considerations.md
Last active August 29, 2015 14:24
Dev <-> Prod Considerations

Dev <-> Prod Considerations

  • robots.txt
  • Analytics snippets
@alexgleason
alexgleason / ergodox-infinity-colemak.json
Created February 14, 2016 04:29
A hacker's keyboard layout
{
"header": {
"Author": "Alex Gleason",
"Base": "Blank",
"Date": "2015-09-12",
"Generator": "KIICONF 0.2",
"KLL": "0.3c",
"Layout": "Default",
"Name": "MDErgo1",
"Version": "0.1"
@alexgleason
alexgleason / cards-block.py
Created March 2, 2016 19:31
WIP custom cards block
from wagtail.wagtailcore.blocks import (
ListBlock,
StructBlock,
CharBlock,
TextBlock,
PageChooserBlock
)
from wagtail.wagtailimages.blocks import ImageChooserBlock
@alexgleason
alexgleason / free-culture-altruism.md
Last active April 1, 2016 22:28
About free culture, anarchism, and altruism

Hey friend. Something I've been thinking about lately is altruism. I think altruism is the defining characteristic of a good society. Our society isn't really conducive to it, since capitalism presents everything like a contest. In a contest you have to beat everyone.

I think people hate socialism because it's a form of forced altruism. The altruists don't care because it's what they'd do anyway. Lately I've been reading about anarchism, which is an idealistic compromise. The idea is to build our society in such a way that it's conducive to altruism, which will encourage the most people to contribute. We wouldn't have to force them, because they'd all do it on their own if we teach them how, and if we built the society the right way.

I think it's possible, though maybe not within our lifetimes. Anyway, all that was to lead into something more relevant: the altruists we have now. There is an underground society of altruists, mostly on the internet, who are actively making contributions to make the world bett

@alexgleason
alexgleason / programming-for-humans.md
Last active April 1, 2016 22:31
Programming for Humans

Programming for Humans

This article is a recollection of my struggles to understand programming, and will hopefully aid people who are new to the craft. I hope it challenges anyone with experience, too.

How code relates to the physical world

The biggest problem I faced when learning how programming works is understanding how everything relates back to life and reality. Many tutorials show you how to achieve things with programming languages, but they don't explain why those things work. At some point it becomes about memorizing commands. In order to feel comfortable I feel like you really need to see the bigger picture.

There is a range of understanding starting from the code on your computer screen, all the way down to the electrons inside of the computer that make your code work. You may want to have at least a basic understanding of every step between. Without this knowledge, you risk becoming an [expert beginner](http://www.daedtech.com/how-developers-stop-learning-rise-of-the-expert-beginner/

@alexgleason
alexgleason / _triangles.scss
Last active May 5, 2016 22:51
Make elements pointy
$triangle-size: 60px !default;
@mixin triangle($hexstring, $side) {
position: relative;
&::after {
content: '';
background-repeat: no-repeat;
display: block;
position: absolute;
background-position: bottom;
@alexgleason
alexgleason / facebookGroupMemberNamesToCsv.js
Created May 23, 2016 02:39
Takes the names of group members in a Facebook group and prints them as CSV output.
/*
Takes the names of group members in a Facebook group and prints them as CSV output.
*/
function facebookGroupMemberNamesToCsv() {
var people = document.querySelectorAll('.fsl.fwb.fcb a');
var output = 'First Name,Last Name\n';
for (var i=0; i<people.length; i++) {
names = (people[i].innerHTML).split(' ');
output += names[0] + ',' + names[names.length-1] + '\n';
}