この記事は、変態アドベントカレンダー 6日目の記事です。前日は はがねのつるぎさん でした。
このアドベントカレンダーは、意識もスキルも高い変態勇者がハイテクを駆使してかくもの、と思ってらっしゃる方にはちょっと申し訳ありません。若干変態度もハイテク度も低めで肩透かしを食らうことになりますが、しばしお付き合いください。
今日のネタは、私自身の日々の切実な課題である、Excel文書と戦う
ための準備、といったところです。
Excel ドキュメントにに対する不満
この記事は、変態アドベントカレンダー 6日目の記事です。前日は はがねのつるぎさん でした。
このアドベントカレンダーは、意識もスキルも高い変態勇者がハイテクを駆使してかくもの、と思ってらっしゃる方にはちょっと申し訳ありません。若干変態度もハイテク度も低めで肩透かしを食らうことになりますが、しばしお付き合いください。
今日のネタは、私自身の日々の切実な課題である、Excel文書と戦う
ための準備、といったところです。
Excel ドキュメントにに対する不満
#!/usr/bin/env perl | |
use Mojolicious::Lite; | |
# storage | |
my $clients = {}; | |
# helpers (methods on app/controller/template) | |
helper 'send_to_all' => sub { | |
my ($self, $message) = @_; |
function myFunction() { | |
var option = googleOAuth_(); | |
option.method = "post"; | |
option.contentType = 'application/json'; | |
option.payload = JSON.stringify({ | |
"query": | |
{ | |
"kinds": | |
[ |
open Spotlib.Spot | |
open GapiUtils.Infix | |
open GapiLens.Infix | |
open GapiLens.StateInfix | |
open GapiMonad.SessionM | |
module OAuth2 = GapiOAuth2 | |
module Conv = GapiConversation | |
module Service = GapiService |
;;; Copyright (c) 2013 Yoshinori Kohyama. Distributed under the BSD 3-Clause License. | |
(ns puyo | |
(:require [clojure.test :refer (with-test run-tests are)] | |
[clojure.set :refer (union)] | |
[clojure.string :as string])) | |
(with-test | |
(defn- fall-one [b s] | |
(->> (reverse b) | |
(apply map vector) |
$ perl installed2cpanfile > cpanfile | |
$ cpanm --installdeps . |
#!/bin/zsh | |
typeset -A closings | |
closings=( '{' '}' '[' ']' ) | |
# usage: find-matching strvar pos | |
# heart of the parser. matches one "element." matching depends on first | |
# character (at pos), can be " for string matching or any in closings | |
# associative parameter. |
USE_OCAMLFIND = true | |
OCAMLPACKS[] = | |
llvm | |
FILES[] = | |
types | |
lambda | |
parser | |
lexer |
# 私が考える安全なプログラムを書くために必要なこと | |
今も昔も「入力によって挙動が大幅に変わるAPI」が世の中には多数存在していて、プログラマが本来意図した挙動と異なる動作を引き起こしている。 | |
- ファイルを開こうとしたらコマンドを実行できてしまったり | |
- CSSセレクタを書いてるつもりがHTMLタグを生成してしまったり | |
- SELECT文を発行するつもりがDELETE文を発行できてしまったり | |
こういったときに | |
- 入力値検証をしないと危険になる |
module Main where | |
import Text.Peggy | |
import Shiba | |
main = | |
getContents >>= \code -> | |
(return $ parseString Shiba.expr "<stdin>" code >>= \ws -> return (Shiba.evalF' ws Shiba.empty [])) >>= print |