This file contains hidden or 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
# Switch to previous branch | |
> git checkout dev | |
Switched to branch 'dev' | |
> git checkout master | |
Switched to branch 'master' | |
> git checkout - | |
Switched to branch 'dev' | |
# on git 1.7.7+, stash untracked files |
This file contains hidden or 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
"Color": | |
"Red": | |
da: Rød | |
se: Roed | |
"Blue": | |
da: Blå | |
se: Blaa | |
"Themes": | |
"Christmas": |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<TripList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://demo.hafas.de/rest/dk/hafasRestTrip.xsd"> | |
<Trip > | |
<Leg name="Bus 8" type="BUS"> | |
<Origin name="Lupinvej / Borgergade (Silkeborg)" type="ST" routeIdx="27" time="07:15" date="19.09.12" /> | |
<Destination name="Silkeborg st (bus)" type="ST" routeIdx="34" time="07:27" date="19.09.12" /> | |
<Notes text="Retning: Silkeborg st (bus);" /> | |
<JourneyDetailRef ref="http://xmlopen.rejseplanen.dk/bin/rest.exe/journeyDetail?ref=795654%2F286674%2F991260%2F230413%2F86%3Fdate%3D19.09.12%26station_evaId%3D743013700%26" /> | |
</Leg> | |
<Leg name="X bus 952X" type="EXB"> |
This file contains hidden or 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
diff --git a/src/letsplay/jazz.clj b/src/letsplay/jazz.clj | |
index ae6a9a9..2e7e47d 100644 | |
--- a/src/letsplay/jazz.clj | |
+++ b/src/letsplay/jazz.clj | |
@@ -80,11 +80,13 @@ | |
;; TODO - avoid hanging around at the limits | |
(limit (+ n (rand-nth '(-7 -6 -5 5 6 7))) 40 65))] | |
(at tick | |
- (+ (beep note) (bass (midi->hz note)))) | |
+ (beep note) |
This file contains hidden or 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
irb(main):002:0> p = Page.new | |
irb(main):005:0> p.image = File.open("/Users/jtj/sample_assets/a.JPG") | |
irb(main):008:0> p.save | |
# Delay while versions are uploaded | |
irb(main):009:0> p.image.url | |
=> https://s3.amazonaws.com/dk.workingbits.dts/uploads/page/image/17/a.JPG | |
irb(main):011:0> p.image.url(:thumbnail) | |
=> "https://s3.amazonaws.com/dk.workingbits.dts/uploads/page/image/17/thumbnail_a.JPG" |
This file contains hidden or 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
manipulate! do |img, index, options| | |
options[:read] = { | |
:dpi => 150 # Or whatever the option name is | |
} | |
options[:write] = { | |
:quality => 50, | |
:depth => 8 | |
} |
This file contains hidden or 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
(setq my-key-pairs | |
'((?! ?1) (?@ ?2) (?# ?3) (?$ ?4) (?% ?5) | |
(?^ ?6) (?& ?7) (?* ?8) (?( ?9) (?) ?0) | |
(?- ?_) (?\" ?') (?{ ?[) (?} ?]) ; (?| ?\\) | |
)) | |
(defun my-key-swap (key-pairs) | |
(if (eq key-pairs nil) | |
(message "Keyboard zapped!! Shift-F10 to restore!") | |
(progn |
This file contains hidden or 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 'rmagick' | |
i = Magick::Image.read("test.jpg")[0] | |
puts i.interlace # => NoInterlace | |
i.write("test2.jpg") { self.interlace = Magick::PlaneInterlace } | |
puts i.interlace # => PlaneInterlace | |
i2 = Magick::Image.read("test2.jpg")[0] | |
puts i2.interlace # => JPEGInterlace |
This file contains hidden or 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 'rmagick' | |
i = Magick::Image.read("test.jpg")[0] | |
puts i.interlace # => NoInterlace | |
i.write("test2.jpg") { self.interlace = Magick::PlaneInterlace } | |
puts i.interlace # => PlaneInterlace | |
puts Magick::Image.read("test2.jpg")[0].interlace # => JPEGInterlace |
This file contains hidden or 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 Lightbulb < Component | |
def value | |
wiretrace(:left).value | |
end | |
end | |
class XorGate < Component | |
def value | |
wiretrace(:up).value ^ wiretrace(:down).value | |
end |