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/env ruby | |
# lazy hack from Robert Klemme | |
module Memory | |
# sizes are guessed, I was too lazy to look | |
# them up and then they are also platform | |
# dependent | |
REF_SIZE = 4 # ? | |
OBJ_OVERHEAD = 4 # ? |
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 ruby | |
if ARGV.size != 2 | |
puts "Usage: #{$0} <from_language> <to_language>" | |
exit -1 | |
end | |
require 'rubygems' | |
require 'ya2yaml' # this gem is needed for this to work! | |
require 'yaml' |
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
// Post repeat directive for logging the rendering time | |
angular.module('myApp').directive('postRepeatDirective', | |
['$timeout', | |
function($timeout) { | |
return function(scope) { | |
if (scope.$first) | |
window.a = new Date(); // window.a can be updated anywhere if to reset counter at some action if ng-repeat is not getting started from $first | |
if (scope.$last) | |
$timeout(function(){ | |
console.log("## DOM rendering list took: " + (new Date() - window.a) + " ms"); |
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
// TipTip CSS - Version 1.2 | |
@mixin tiptip_grey | |
background-color: $greylight | |
color: $white | |
@mixin tiptip_black | |
background-color: $black | |
color: $white |