Skip to content

Instantly share code, notes, and snippets.

module DataMapper
module Mongo
module Model
# ...
# Defines a Property on the Resource
#
# Overrides the property method in dm-core so as to automatically map
# Array and Hash types to EmbeddedArray and EmbeddedHash respectively.
#
#subnav li
&:after
:content "·"
// IE will get an extra dot at the end. nm.
&:nth-last-child(1):after
:content ""

Before new terminal:

/Users/antw/.rvm/gems/ruby-1.9.2-p0@global/gems/rake-0.8.7/bin
/Users/antw/.rvm/gems/ruby-1.9.2-p0@global/gems/rake-0.8.7/lib
/Users/antw/.rvm/gems/ruby-1.9.2-p0@bluth/gems/rack-1.2.1/bin
/Users/antw/.rvm/gems/ruby-1.9.2-p0@bluth/gems/rack-1.2.1/lib
/Library/Ruby/Site/1.8
/Library/Ruby/Site/1.8/powerpc-darwin10.0

/Library/Ruby/Site/1.8/universal-darwin10.0

@antw
antw / new-twitter-tweaks.css
Created September 24, 2010 00:59
A few #newtwitter tweaks
.stream .stream-items .stream-item:hover {
background-color: transparent !important;
border-top-color: #ebebeb !important;
}
.stream .stream-items .focused-stream-item:hover {
border-color: #ccc !important;
background-color: #eee !important;
}
@antw
antw / gist:1279408
Created October 11, 2011 20:55
Class Inheritable Attributes in CoffeeScript
# So messy. There must be a better way...
class Model
@property: (name) ->
if @properties? and @properties.length is @.__super__?.constructor.properties?.length
@properties = Array::slice.call @.__super__.constructor.properties, 0
else if not @properties?
@properties = []
@properties.push name
@antw
antw / application.js
Created October 27, 2011 21:11 — forked from lachie/application.js
rails 3.1 asset pipeline + stitch/CommonJS
// in app/assets/javascripts/application.js
//= require jquery
//= require jquery_ujs
//= require ./stitch_header
//= require_tree .
@antw
antw / point-1000.txt
Last active August 29, 2015 14:04
Import from Germany
Before including export to Germany @ Feb 10, 16:00
--------------------------------------------------
+---+------------------------------------------------+---------+----------+--------+
| | Key | % Used | MWh Load | M.Cost |
+---+------------------------------------------------+---------+----------+--------+
| U | local_demand | - | 17466.24 | - |
+---+------------------------------------------------+---------+----------+--------+
| A | energy_chp_supercritical_waste_mix | 100.0 % | 386.42 | 0.00 |
| A | energy_power_wind_turbine_inland | 100.0 % | 187.18 | 0.00 |
@antw
antw / 01-point-1040-limited.txt
Last active August 29, 2015 14:04
Interconnect import/export with Germany, limited by DE price
After including export to Germany @ 13 Feb @ 08:00
--------------------------------------------------
+---+------------------------------------------------+---------+----------+--------+
| | Key | % Used | MWh Load | M.Cost |
+---+------------------------------------------------+---------+----------+--------+
| U | local_demand | - | 12003.00 | - |
| U | export_to_de | - | 430.50 | - |
+---+------------------------------------------------+---------+----------+--------+
| A | energy_chp_supercritical_waste_mix | 100.0 % | 386.42 | 0.00 |
@antw
antw / 01-remove-loss.diff
Last active August 29, 2015 14:07
etengine#716 diffs
diff --git a/nodes/energy/energy_power_hv_network_electricity.ad b/nodes/energy/energy_power_hv_netw
index 93fe2ba..bf6d28e 100644
--- a/nodes/energy/energy_power_hv_network_electricity.ad
+++ b/nodes/energy/energy_power_hv_network_electricity.ad
@@ -1,6 +1,7 @@
- use = undefined
- energy_balance_group = electricity network
-- output.loss = elastic
+- output.loss = 0.0
+- output.electricity = 1.0
@antw
antw / .gitignore
Last active October 5, 2015 20:24
Moses Network Cache Benchmark
tmp/*