Skip to content

Instantly share code, notes, and snippets.

View slaskis's full-sized avatar
🤓

Robert Sköld slaskis

🤓
View GitHub Profile
Dir["#{File.expand_path(File.dirname(__FILE__))}/vendor/gems/*/lib"].each { |path| $:.unshift path }
require 'rubygems'
require 'sinatra'
require 'app.rb'
run App
require "rubygems"
require "sinatra" # <----- comment this line to make it work again
require "dm-core"
require "active_support"
require "pp"
class Link
include DataMapper::Resource
public static function localToLocal( containerFrom : DisplayObject, containerTo : DisplayObject, origin : Point = null ) : Point {
var point : Point = origin ? origin : new Point( );
point = containerFrom.localToGlobal( point );
point = containerTo.globalToLocal( point );
return point;
}
function getZoomScale( min , max , step = 0 , steps = 3 ) {
var diff = max - min;
if( step == 0 )
namespace :db do
require "models"
desc "WARNING! Resets the db!"
task :migrate do
puts "Are you sure? This will EMPTY the database. (y/n)"
if STDIN.gets.chomp == "y"
DataMapper.auto_migrate!
end
end
module DataMapper
module Model
module Relationship
alias_method :orig_has, :has
# Overrides has method if:
# 1. It's ManyToMany
# 2. Share the same storage
#
# And then modify the table to save the relationship ids in a string instead of
camlp4o
Fatal error: cannot load shared library dllunix
Reason: dlopen(/usr/local/Cellar/objective-caml/3.11.1/lib/ocaml/stublibs/dllunix.so, 138): Symbol not found: _caml_atom_table
Referenced from: /usr/local/Cellar/objective-caml/3.11.1/lib/ocaml/stublibs/dllunix.so
Expected in: flat namespace
in /usr/local/Cellar/objective-caml/3.11.1/lib/ocaml/stublibs/dllunix.so
diff --git a/haxe/Makefile b/haxe/Makefile
index 07726ab..d0c92a7 100644
--- a/haxe/Makefile
+++ b/haxe/Makefile
@@ -1,45 +1,68 @@
-EXTLIB=../../mtcvs/extlib-dev
-SWFLIB=../../mtcvs/swflib
-EXTC=../../mtcvs/extc
+EXTLIB=../ocaml/extlib-dev
+SWFLIB=../ocaml/swflib
diff -r -U1 a/src/tools/install.neko b/src/tools/install.neko
--- a/src/tools/install.neko 2009-12-09 12:35:20.000000000 +0100
+++ b/src/tools/install.neko 2009-12-09 13:36:35.000000000 +0100
@@ -123,2 +123,3 @@
if( osx_universal ) {
+ /* Commenting instead because patching is stupid
var dir = "../libs/include/osx_universal/";
@@ -132,2 +133,5 @@
libs.mysql.lib = dir + "libmysqlclient.a";
+ */
diff -r -U1 a/src/tools/install.neko b/src/tools/install.neko
--- a/src/tools/install.neko 2009-12-09 12:35:20.000000000 +0100
+++ b/src/tools/install.neko 2009-12-09 13:35:36.000000000 +0100
@@ -123,2 +123,3 @@
if( osx_universal ) {
+ /* Commenting instead because patching is stupid
var dir = "../libs/include/osx_universal/";
@@ -132,2 +133,5 @@
libs.mysql.lib = dir + "libmysqlclient.a";
+ */