Skip to content

Instantly share code, notes, and snippets.

View codeimpossible's full-sized avatar
🍕
P I Z Z A

Jared Barboza codeimpossible

🍕
P I Z Z A
View GitHub Profile

Keybase proof

I hereby claim:

  • I am codeimpossible on github.
  • I am codeimpossible (https://keybase.io/codeimpossible) on keybase.
  • I have a public key whose fingerprint is AEB9 81B3 8416 24B7 0CCB 27AA 091E 348F D8F9 61E9

To claim this, I am signing this object:

@codeimpossible
codeimpossible / tilelayer.cs
Created May 5, 2014 19:16
ERMAH GERD WHY NO GIZMOS?!?!?!
[ExecuteInEditMode]
public class TileLayer : MonoBehaviour
{
public Vector2 LayerSize;
public Vector2 CellSize;
public Color GridColor;
public bool DrawGridLines;
public bool DrawPaintbrushGuide;
@codeimpossible
codeimpossible / directions.md
Last active August 29, 2015 14:01
compiling ragel with js support on mac osx

Prerequisites

  • Node.js (0.10.9 or higher with npm)
  • Make sure you have gcc/g++ 4.6 (4.7 is too strict to build ragel-js)
  • Make sure you have autoconf and automake (brew install automake)
  • Make sure you have the official ragel (brew install ragel)

Clone the gcc patched version of ragel-js

$ git clone https://github.com/codeimpossible/ragel-js

# vim:ft=zsh ts=2 sw=2 sts=2
#
# Based on agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#
@codeimpossible
codeimpossible / JamesBond.cs
Created October 28, 2014 02:52
JamesBond - a quick and dirty lesson in reflection, invocation and generally mucking about with an objects private vars
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Dynamic;
using System.Reflection;
using System.Linq.Expressions;
namespace MISix {
public class ReflectedResult<T> {
@codeimpossible
codeimpossible / pod-pub.ps1
Created February 7, 2015 13:18
Script to automate our podcast publishing
Param (
[Parameter(Mandatory=$True)]
[string]$url
)
# this assumes you have youtube-dl installed
# choco install youtube-dl
# this also assumes you have ffmpeg installed
# choco install ffmpeg
@codeimpossible
codeimpossible / blog-post-importer.es6
Created June 29, 2015 17:09
Abstract Factory, with self-registration!
let subclasses = {};
export default class BlogPostImporter {
constructor(body) {
for(var p in body) {
if(body.hasOwnProperty(p)) {
this[p] = body[p];
}
}
}
@codeimpossible
codeimpossible / 1-hoisting.js
Last active August 29, 2015 14:23
Variable hoisting
var variable = "global";
function doSomething() {
console.log(variable);
var variable = 'local';
console.log(variable);
}
doSomething();
# needs to be run in Package Manager Console
# i made this multiple lines for readability,
# you might need to compact it to one to run it
Get-Project -All | ForEach-Object {
Write-Host "";
Write-Host $_.ProjectName;
Write-Host "------------";
Get-Package -ProjectName $_.ProjectName -Filter <PACKAGE_NAME> | ForEach-Object {
Write-Host ($_.Id, $_.Version) -Separator " "
}