Skip to content

Instantly share code, notes, and snippets.

View ixtli's full-sized avatar
🌹
Typing text into boxes.

Chris Galardi ixtli

🌹
Typing text into boxes.
View GitHub Profile
div#wrapper div.arrow {
top: 232px;
width: 100px;
height: 100px;
position: absolute;
overflow: hidden;
box-shadow: 0 16px 10px -17px rgba(0, 0, 0, 0.5);
}
div#wrapper div.arrow:after {
@ixtli
ixtli / Makefile
Created June 27, 2012 05:39 — forked from mjc/Makefile
Example Q&D makefile. untested.
CFLAGS="-g -Wall"
DEPS="foo.o bar.o baz.o"
TARGET=progname
.PHONY: clean all
$(TARGET): $(DEPS)
$(CXX) -o $(TARGET) $(CFLAGS) $(CXXFLAGS) $(DEPS)
@ixtli
ixtli / test.css
Created September 13, 2012 00:52
Circle vs Rect intersection volume in 2D
canvas {
background-color: rgba(0,0,0,.1);
}
@ixtli
ixtli / rubiconcodec.py
Created October 3, 2012 04:59
A tool to aid in navigation of The Rubicon.
#!/usr/bin/python
# coding: utf-8
""" Rubicon Codec v.01 """
import sys;
off = u'░';
on = u'█';
@ixtli
ixtli / localedump.py
Created March 6, 2013 16:10
print out currency prefixes for all utf8 locales on the current POSIX compliant machine. requires python 2.7 (for the subprocess module). change utfLocaleSuffix to match the utf8 extension for locale names on your machine. you can determine this by running `locale -a | grep 'utf'` and seeing what they look like.
#!/usr/bin/python
# coding: utf-8
import locale, subprocess;
# on centos this is 'utf8'
utfLocaleSuffix = 'UTF-8'; #darwin/freebsd
def main():
# get all locales
@ixtli
ixtli / deflate.py
Created May 30, 2013 05:35
Correctly samples this image: http://24.media.tumblr.com/33afdde66541395bbb3f9c8818be943a/tumblr_mmd4ozTT2g1qbgkkto1_1280.png (expected "thing.png") and outputs a "1:1" version called "deflate.png" and an explanatory reference called "grid.png"
#!/usr/bin/python
import Image;
import math;
img = Image.open("thing.png");
pixels = img.load();
width = img.size[0];
height = img.size[1];
@ixtli
ixtli / vimrc
Last active December 29, 2015 23:49
my vimrc (install Vundle first: https://github.com/gmarik/Vundle.vim)
" Requires Vundle: https://github.com/gmarik/Vundle.vim
" Every vimconfig should start like this:
syntax on
" Basic config
set nocompatible
set autoindent
set smartindent
set copyindent
Your pain is the breaking of the shell that encloses your understanding. Just as the stone of the fruit must break, so that its heart may stand in the sun, so must you know pain. And if you keep your heart in wonder at the daily miracles of your life, your pain would not seem less wondrous than your joy. If you accept the seasons of your heart, as you have always accepted the four seasons, you would watch with serenity the winters of your grief. Much of your pain is self-chosen. It is the bitter potion by which the physician within you heals your sick self. Therefore, trust the physician, and drink his remedy in silence and tranquility. For his hand, though heavy and hard, is guided by the tender hand of the Unseen. - Kahlil Gibran
<script type="text/javascript">
(window.NREUM || (NREUM = {})).loader_config = {
xpid: "VQQUUFNS"
};
window.NREUM || (NREUM = {}), __nr_require = function (t, e, n) {
function r(n) {
if (!e[n]) {
var o = e[n] = {
exports: {}
};
/**
* Apply an object's prototype as a mixin to another object's prototype
* @param {Object} destination The class to mix in to
* @param {(Object|Array)} source An object or array of objects to mix in
*/
function mixIn(destination, source)
{
if (typeof source !== TYPE_OF_ARRAY)
{
$.extend(destination.prototype, source.prototype);