This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library IEEE; | |
use IEEE.std_logic_1164.all; | |
use IEEE.std_logic_arith.all; | |
use IEEE.std_logic_unsigned.all; | |
use work.constants.all; | |
use work.ctypes.all; | |
entity ALU is port ( | |
clk : in std_logic; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright @ Bjarte Johansen 2012 | |
# License: http://ljos.mit-license.org/ | |
from AppKit import NSApplication, NSApp, NSWorkspace | |
from Foundation import NSObject, NSLog | |
from PyObjCTools import AppHelper | |
from Quartz import kCGWindowListOptionOnScreenOnly, kCGNullWindowID, CGWindowListCopyWindowInfo | |
class AppDelegate(NSObject): | |
def applicationDidFinishLaunching_(self, notification): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* See: http://0x10c.com/doc/dcpu-16.txt */ | |
function hex(n) { | |
return '0x' + n.toString(16); | |
} | |
function disassemble (code) { | |
var PC = 0; | |
var operand = function (bits) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
M2_REPO=${HOME}/.m2 | |
OLDFILES=/tmp/deleted_artifacts.txt | |
AGE=181 # more or less 6 months and it's a palindromic prime number, so it's cool | |
echo "==== To be Deleted Jars ====" >> ${OLDFILES} | |
find "${M2_REPO}" -name '*-SNAPSHOT*jar' -atime +${AGE} -exec dirname {} \; >> ${OLDFILES} | |
echo "==== To be Deleted Wars/Ears ====" >> ${OLDFILES} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
Async.js is a collection of simple async patterns | |
built to combat callback hell | |
### | |
### | |
ASYNC SEQUENCE | |
Allows a user to define a sequence of async functions. | |
EXAMPLE: | |
async = require 'async' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyCallable(object): | |
def __init__(self, urlparts, callable): | |
self.urlparts = urlparts | |
self.callable = callable | |
def __call__(self, **kwargs): | |
print kwargs | |
print self.urlparts | |
def __getattr__(self, name): | |
# Return a callable object of this same type so that you can just keep | |
# chaining together calls and just adding that missing attribute to the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import imp | |
import sys | |
def create_modules(module_path): | |
path = "" | |
module = None | |
for element in module_path.split('.'): | |
path += element | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <stdarg.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
enum type { | |
NIL, |