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
| #!/bin/sh | |
| exec dc -e "[d]sd[q]sq[p]sp[1+dljr%0=ddlg>a]sa[+z1<s]ss[dsj2/sg0laxs_z1=qlsxdlj=p]sx[lilxxclid1+silz!<l]sl$1sz1sillx" |
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
| #!/bin/sh | |
| # nautilus script: send to running emacs | |
| echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" | xargs -I XX sh -c 'emacsclient -e "(find-file \"XX\")" || gdialog --msgbox "coluld not open XX"' |
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
| # inspired by http://www.msng.info/archives/2012/12/php-not.php | |
| module AutoNot | |
| def method_missing(method, *args) | |
| if /\Anot_(.*\?)\z/ =~ method | |
| ! send($1, *args) | |
| end | |
| end | |
| end |
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
| ;; LTSV (Labeled Tab-separated Values) parser by Clojure | |
| (use '[clojure.string :only [split]]) | |
| (defn ltsv-parse-line | |
| "Parses one LTSV line. Returns a map." | |
| [^String line] | |
| (reduce (fn [r s] (let [[k v] (split s #":" 2)] (assoc r k v))) | |
| {} (split line #"\t") )) |
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
| #!/bin/bash | |
| R=36 | |
| RATIO=2 | |
| for ((y = -R; y <= R; y += RATIO)); do | |
| x=$(dc -e "$R 2^${y/-/_} 2^-vp") | |
| printf '%*s%*s%*s\n' $((R - x)) x $x '' $x x | |
| done |
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
| (defn encoded-num-seq [n digits] | |
| (let [base (.length digits) | |
| enc1 (fn [n r] | |
| (let [q (quot n base) r2 (str (.charAt digits (rem n base)) r)] | |
| (if (zero? q) r2 (recur q r2)) ))] | |
| (map #(enc1 % "") (iterate inc n)) )) | |
| (defmacro nth [c i & nf] | |
| (if (and (list? c) (= (first c) 'encoded-num-seq)) | |
| (let [(f a1 a2) c] `(first (~f (+ ~i ~a1) ~a2))) |
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
| define dsl | |
| (use-modules (srfi srfi-1)) | |
| (define targets '()) | |
| (define (showtargets) | |
| (string-join (reverse targets) "\n") ) | |
| (define-macro (push! place item) | |
| `(set! ,place (cons ,item ,place)) ) |
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
| これはbash-4.2のリリース以降bash-4.3に追加された新機能の簡潔な説明です。 | |
| いつもどおり、完全な説明を探している場合はマニュアルページ (doc/bash.1) | |
| が適切です。 | |
| 1. Bashの新機能 | |
| a. 補完の動作の`helptopic'は、シェル組み込みコマンドだけでなくすべての | |
| ヘルプのトピックに対応します。 | |
| b. 組み込みコマンド`help'で、最初に前方一致が行われることはなくなりま |
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
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use 5.014; | |
| use File::Basename qw(basename); | |
| package NoteMu2Feed { | |
| use LWP::UserAgent; | |
| use JSON qw(decode_json); | |
| use XML::Feed; |
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
| #!/usr/bin/env ruby | |
| module PipeOperator | |
| refine Array do | |
| def |(x) | |
| PipeLine.new(self) | x | |
| end | |
| end | |
| end |