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
# Builder file for sentry | |
# | |
FROM ubuntu | |
MAINTAINER Michael Crosby | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get upgrade |
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
require 'fiddle' | |
module Python | |
def __class__= k | |
value = _wrap self | |
[k.object_id<<1].pack('Q').unpack('C8').each_with_index {|n,i|value[i+8]=n} | |
end | |
def _wrap klass; Fiddle::Pointer.new Fiddle.dlwrap klass; end | |
end |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# http://stackoverflow.com/a/10031877 | |
import numpy | |
import cairo | |
import math | |
from gi.repository import Gtk,Gdk | |
data = numpy.zeros((200, 200, 4), dtype=numpy.uint8) | |
surface = cairo.ImageSurface.create_for_data( |
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 (c) 2011, Eng Eder de Souza | |
# ___ _ _ ___ | |
# | __|__| |___ _ _ __| |___ / __| ___ _ _ _____ _ | |
# | _|/ _` / -_) '_| / _` / -_) \__ \/ _ \ || |_ / _` | | |
# |___\__,_\___|_| \__,_\___| |___/\___/\_,_/__\__,_| | |
#Accessing the Google API for speech recognition! | |
#Open a file type Wav to speech recognition | |
#This source does not require any external programs to perform audio conversions :-) | |
#http://ederwander.wordpress.com/2011/11/06/accessing-the-google-speech-api-python/ | |
#Eng Eder de Souza |
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
PROGRAM := llvm-brainfuck | |
OBJECTS := main.o | |
SHIM := shim.a | |
SHIM_OBJECTS := shim.o | |
CC := clang | |
CXX := clang++ | |
CXXFLAGS := $(shell llvm-config --cppflags) -Wall -Werror -pedantic | |
LDFLAGS := $(shell llvm-config --ldflags --libs core) |
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
def wrap(angle): | |
if angle > pi: | |
angle -= (2*pi) | |
if angle < -pi: | |
angle += (2*pi) | |
if angle < 0: | |
angle += 2*pi | |
return angle | |
def magnetometer_readings_to_tilt_compensated_heading(bx, by, bz, phi, theta): |
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
// Playground - noun: a place where people can play | |
import Foundation | |
typealias Byte = UInt8 | |
protocol GenericIntegerType: IntegerType { | |
init(_ v: Int) | |
init(_ v: UInt) | |
init(_ v: Int8) |
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
machine: | |
node: | |
version: 0.10.35 | |
dependencies: | |
pre: | |
- sudo apt-get install -y libpoppler-glib-dev libpoppler-glib8 libcairo2-dev libcairo2 | |
- sudo apt-get install -y libpq-dev | |
database: | |
override: | |
- psql -c 'create database test;' -U postgres |
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
# config/environments/production.rb: | |
config.action_controller.asset_host = "http://cdn%d.example.com" | |
# config/initializers/refinery/images.rb: | |
config.dragonfly_url_format = "/images/:job/:basename.:ext" | |
if Rails.env.production? | |
config.dragonfly_url_host = "http://cdn4.example.com" | |
end | |
# config/initializers/refinery/resources.rb: |
OlderNewer