sudo aptitude install r-base sudo aptitude install eog
Read from stdin and send graph output to r.png, eval $1 and display r.png
--ignore-directory=is:local/lib | |
--ignore-directory=is:local/man | |
--ignore-directory=is:local/bin | |
--type-add=perl:is:cpanfile |
_.-._ | |
_,-' `-._ | |
(_ '_) | |
(_`-._ _,-'_) | |
(_`-._`-'_,-'_) | |
(_`-._`-'_,-'_) | |
`-._`-'_.-' | |
`-' |
# Benchmark: timing 1000000 iterations of class_accessor, class_accessor_classy, class_accessor_complex, class_accessor_constructor, class_accessor_fast, class_accessor_fast_xs, class_accessor_lite, class_methodmaker, class_spiffy, class_xsaccessor, class_xsaccessor_array, mojo, moo, moose, moose_immutable, mouse, mouse_immutable, object_tiny, object_tiny_xs, rose, spiffy... | |
# class_accessor: 0.761038 wallclock secs ( 0.76 usr + 0.00 sys = 0.76 CPU) @ 1315789.47/s (n=1000000) | |
# class_accessor_classy: 0.459568 wallclock secs ( 0.45 usr + 0.01 sys = 0.46 CPU) @ 2173913.04/s (n=1000000) | |
# class_accessor_complex: 0.96933 wallclock secs ( 0.97 usr + 0.00 sys = 0.97 CPU) @ 1030927.84/s (n=1000000) | |
# class_accessor_constructor: 2.08857 wallclock secs ( 2.09 usr + 0.00 sys = 2.09 CPU) @ 478468.90/s (n=1000000) | |
# class_accessor_fast: 0.663317 wallclock secs ( 0.66 usr + 0.00 sys = 0.66 CPU) @ 1515151.52/s (n=1000000) | |
# class_accessor_fast_xs: 0.320578 wallclock secs ( 0.32 usr + 0.00 sys = 0.32 CPU) @ 3125 |
# Assumes the first digit is a timestamp, and that all of them have the same width. Most useful with ms precision. | |
# tail -f logfile | THIS_FILTER | |
perl -MList::Util=min -nE 'state $last= 0; /"([\dT:,-]+)"/ and do { my $c = ($1 =~ s/\D//gr); my $d = $c - $last; my $w = min(200, $d / 5); say $d . ": " . ("x" x $w); $last = $c }; print $_' |
;; | |
;; Super simple org-mode slides | |
;; | |
;; Narrow the display to a subtree and navigate between them. Super | |
;; simple stuff. | |
;; | |
;; | |
;;; Usage: | |
;; |
(defproject scaper "0.1.0-SNAPSHOT" | |
:description "FIXME: name" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.6.0"]] | |
:main ^:skip-aot scaper.core | |
:target-path "target/%s" |
(defun ps/project-buffer-file-name () | |
"Return the current buffer file name, relative to the project | |
root dir." | |
(let* ((full-file-name (buffer-file-name)) | |
(project-dir (or (ps/project-dir) (error "Not in a PerlySense project."))) | |
(project-file-name | |
(replace-regexp-in-string (regexp-quote (format "%s/" project-dir)) "" full-file-name)) | |
) | |
project-file-name |
(defun ps/edit-deref-type (sigil) | |
"Enclose the text from point and backwards to the preceeding $ | |
in SIGIL{TEXT}." | |
(let ((end (point))) | |
(when (search-backward "$" nil t) | |
(insert sigil) | |
(insert "{") | |
(goto-char (+ 2 end)) | |
(insert "}") | |
) |
#!/bin/bash | |
source ~/.bashrc | |
nvm use | |
perl -Mlocal::lib=local bin/app.pl worker & | |
perl -Mlocal::lib=local local/bin/morbo bin/app.pl --listen=http://*:9000 & | |
ember serve --proxy=http://127.0.0.1:9000 & | |
trap "kill -TERM -$$" SIGINT |