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 TileProcessor | |
def tile temp_object,tile_size=256 | |
geom = "#{tile_size}x#{tile_size}" | |
temf = Tempfile.open('o.ptif') | |
`convert #{temp_object.path} -define tiff:tile-geometry=#{geom} -compress jpeg 'ptif:#{temf.path}'` | |
temf | |
end | |
end | |
tiled_images.processor.register(TileProcessor) |
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
(defn consumer-config [] {"zookeeper.connect" "localhost:2182" | |
"group.id" (str (java.util.UUID/randomUUID)) | |
"auto.offset.reset" "smallest" | |
"auto.commit.enable" "false"}) | |
(defn fetch-first [topic] | |
(with-resource [c (zk/consumer (consumer-config))] | |
zk/shutdown | |
(first (zk/messages c topic)))) |
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 Artist | |
include Mongoid::Document | |
has_many :history_events, autosave: true, validate: true | |
end | |
class HistoryEvent | |
include Mongoid::Document | |
belongs_to :artist | |
validates_presence_of :headline |
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 PollStation | |
start: => @runner = setInterval @oneSecond, 50 | |
stop: => clearInterval(@runner) | |
runner: undefined | |
doOn: (num, func, args) => | |
$(document).on 'poll:oneSecond', (e, second, epochSecond) -> | |
if (epochSecond % num) == 0 | |
$(document.body).trigger("poll:#{num}Second") | |
func() | |
oneSecond: => |
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/bash | |
### BEGIN INIT INFO | |
# Provides: APPLICATION | |
# Required-Start: $all | |
# Required-Stop: $network $local_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start the APPLICATION unicorns at boot | |
# Description: Enable APPLICATION at boot time. | |
### END INIT INFO |
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
:indentation-update | |
(("with-bindings" . 1))) | |
(:return | |
(:ok | |
(("Unable to resolve symbol: break! in this context" " [Thrown class java.lang.RuntimeException]" nil) | |
(("QUIT" "Quit to the SLIME top level")) | |
((0 "[36m Util.java:156 clojure.lang.Util.runtimeException[39m" | |
(:restartable nil)) | |
(1 "[36m Compiler.java:6720 clojure.lang.Compiler.resolveIn[39m" | |
(:restartable nil)) |
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
src/libwaitress/waitress.c: In function ‘WaitressHandleHeader’: | |
src/libwaitress/waitress.c:670:31: warning: assignment from incompatible pointer type | |
src/libwaitress/waitress.c: In function ‘WaitressFetchCall’: | |
src/libwaitress/waitress.c:1017:29: warning: assignment from incompatible pointer type | |
src/libwaitress/waitress.c:1018:22: warning: assignment from incompatible pointer type | |
src/libwaitress/waitress.c:1019:23: warning: assignment from incompatible pointer type | |
src/libwaitress/waitress.c:1022:23: warning: assignment from incompatible pointer type | |
src/libwaitress/waitress.c:1023:24: warning: assignment from incompatible pointer type | |
src/libwaitress/waitress.c:1039:5: warning: passing argument 2 of ‘gnutls_transport_set_pull_function’ from incompatible pointer type | |
/usr/include/gnutls/gnutls.h:910:8: note: expected ‘gnutls_pull_func’ but argument is of type ‘ssize_t (*)(struct WaitressHandle_t *, char *, size_t)’ |
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
client | |
dev tun | |
proto tcp | |
remote hostname 1194 | |
resolv-retry infinite | |
nobind |
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
mode server | |
tls-server | |
local xxx.xxx.xxx.xxx ## ip/hostname of server | |
port 1194 ## default openvpn port | |
proto tcp-server | |
dev tun | |
persist-key |
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
(defun ruby-change-block() | |
(interactive) | |
(save-excursion | |
(let (beg end start-char end-char start-line end-line block-content one-liner) | |
(ruby-beginning-of-block) | |
(progn | |
(re-search-forward "do") | |
(backward-kill-word 1);; kill "do" | |
(setq beg (point) |