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
module Spreadsheet | |
module Excel | |
module Writer | |
class Worksheet | |
alias_method :write_from_scratch_without_header_footer, :write_from_scratch | |
def write_from_scratch | |
if @worksheet.header | |
write_op opcode(:header), [@worksheet.header.bytesize, 0].pack("vC"), @worksheet.header | |
end |
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
THREE.Mesh.prototype.rotateAboutObjectAxis = (axis, radians) -> | |
rotationMatrix = new THREE.Matrix4() | |
rotationMatrix.makeRotationAxis axis.normalize(), radians | |
@matrix.multiplySelf rotationMatrix | |
@rotation.getRotationFromMatrix @matrix | |
THREE.Mesh.prototype.rotateAboutWorldAxis = (axis, radians) -> | |
rotationMatrix = new THREE.Matrix4() | |
rotationMatrix.makeRotationAxis axis.normalize(), radians | |
rotationMatrix.multiplySelf @matrix |
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
THREE.Mesh.prototype.rotateAboutObjectAxis = (axis, radians) -> | |
rotationMatrix = new THREE.Matrix4() | |
rotationMatrix.makeRotationAxis axis.normalize(), radians | |
@matrix.multiplySelf rotationMatrix | |
@rotation.getRotationFromMatrix @matrix | |
THREE.Mesh.prototype.rotateAboutWorldAxis = (axis, radians) -> | |
rotationMatrix = new THREE.Matrix4() | |
rotationMatrix.makeRotationAxis axis.normalize(), radians | |
rotationMatrix.multiplySelf @matrix |
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 | |
# Install this in your Git repo in .git/hooks/prepare-commit-msg. Git doesn't | |
# support global hooks, but you can work around it using templates, see: | |
# | |
# https://github.com/mroth/lolcommits/wiki/Enabling-Lolcommits-for-all-your-Git-Repositories. | |
ORIGINAL_COMMIT_MSG=$(cat "$1") | |
# from http://www.emoji-cheat-sheet.com/ |
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 'rspec/core/formatters/progress_formatter' | |
# | |
# Test Log Formatter | |
# | |
# * Logs example descriptions to the Rails test.log | |
# * If the PRINT_FAILURE_LOG env is set, the test.log for failed examples will | |
# be printed to stdout | |
# | |
# Put this somewhere, e.g. spec/support/test_log_formatter.rb, then add this to your .rspec: |
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 example at http://bl.ocks.org/3758852 --> | |
<html> | |
<head> | |
<title>Isometric Test</title> | |
<style> | |
.board { | |
-webkit-transform:matrix(1,-0.6, 1,0.6, 0,0); | |
-moz-transform:matrix(1,-0.6, 1,0.6, 0,0); | |
-o-transform:matrix(1,-0.6, 1,0.6, 0,0); | |
transform:matrix(1,-0.6, 1,0.6, 0,0); |
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
~ ‹1.9.3-p194› $ mkdir a | |
~ ‹1.9.3-p194› $ cp -r a a | |
cp: a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/a/ |
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
%%%------------------------------------------------------------------- | |
%%% File : quad_tree.erl | |
%%% @author Jamie Burrell | |
%%% @doc Erlang implementation of a quadratic tree. | |
%%% @end | |
%%% @since 2009-02-10 | |
%%% @end | |
%%%------------------------------------------------------------------- | |
-module(quad_tree). |
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/zsh | |
# computer activity data collection for http://jehiah.cz/one-two/ | |
# Originally by Jehiah Czebotar. This verison by Luca Spiller. | |
FILE="$HOME/Dropbox/activity_log/`hostname`-`date +%Y%m%d`.log" | |
function log_activity() | |
{ | |
local TIME=`date "+%Y-%m-%dT%H:%M:%S%z"` | |
local IDLE=$((`/usr/sbin/ioreg -c IOHIDSystem | sed -e '/HIDIdleTime/!{ d' -e 't' -e '}' -e 's/.* = //g' -e 'q'` / 1000000000 )) |
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 CalendarController | |
SKIP_DAYS = 35 | |
constructor: (@parent, @date = moment()) -> | |
@parent.on 'click', '[data-direction=prev]', @movePrevious | |
@parent.on 'click', '[data-direction=next]', @moveNext | |
@parent.on 'changeDate', '[data-date-picker]', @changeDate | |
movePrevious: (e) => | |
e.preventDefault() |