てすとてすと
てすてす
.mode tabs posts | |
.output /tmp/posts.tsv | |
select * from posts; |
# envがあると動いた | |
# Begin Whenever generated tasks for: app | |
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
0,30 * * * * /bin/bash -l -c 'cd /var/www/app/current && env bundle exec script/rails runner -e staging '\''PostScheduled.post(-15.minutes.from_now..15.minutes.from_now)'\'' >> log/cron.log 2>&1' | |
# End Whenever generated tasks for: app |
// a Angular.js directive that activates jquery-simple-datetimepicker | |
// | |
// jquery-simple-datetimepicker: | |
// | |
// https://github.com/mugifly/jquery-simple-datetimepicker | |
// | |
// usage: | |
// | |
// <input type="text" ng-model="datetime" ng-dtpicker ng-change="doSomething(datetime)" /> | |
// |
class DashboardController < ApplicationController | |
include TabsHelper | |
set_tab :dashboard | |
def index | |
end | |
end |
chmod +x crawler.ml | |
./crawler.ml > photos.html | |
open photos.html |
#!/usr/bin/env ocamlscript | |
Ocaml.packs := ["batteries"; "netclient"] | |
-- | |
open BatPervasives | |
open Str | |
open Http_client.Convenience | |
let url = "http://matome.naver.jp/odai/2135350364969742801" | |
let pattern = regexp "<img src=\".+\".*class=\"MTMItemThumb\".*/>" |
export OCAML_MAJOR_VERSION=4 | |
export OCAML_MINOR_VERSION=00 | |
export OCAML_PATCH_VERSION=0 | |
curl -kL https://raw.github.com/hcarty/ocamlbrew/master/ocamlbrew-install | bash |
(require 'cl) | |
(defun tsv-to-ruby (&optional b e) | |
"TSV to ruby" | |
(interactive "r") | |
(lexical-let ((str (buffer-substring b e))) | |
(delete-region b e) | |
(insert (mapconcat #'identity | |
(list "[" | |
(mapconcat #'tsv-to-ruby-line (split-string str "\n") ",\n ") |
(require 'cl) | |
(defun tsv-to-sexp (&optional b e) | |
"TSV to S-exp" | |
(interactive "r") | |
(lexical-let ((str (buffer-substring b e))) | |
(delete-region b e) | |
(insert (pprint (mapcar (lambda (line) (split-string line "\t")) | |
(split-string str "\n")))))) |