※ 項目の名前は適当
※ 実装してみたい全ての機能を記述しているわけではありません
※ サンプルコードは古い構想を含んでいるかもしれません。注意して読んでください
| class Symbol | |
| def call(*argv) | |
| case | |
| when block_given? | |
| -> obj { self.to_proc[obj, *argv, &proc] } | |
| when argv.size > 0 | |
| -> obj { self.to_proc[obj, *argv] } | |
| else | |
| self.to_proc | |
| end |
| import std.algorithm; | |
| import std.exception; | |
| import std.stdio; | |
| import std.range; | |
| import std.traits; | |
| import std.typecons; | |
| class InvalidCharacerException : Exception { | |
| this(string msg, string file = __FILE__, uint line = __LINE__) { | |
| super(msg, file, line); |
| # start GremlinServer | |
| # bin/gremlin-server.sh -i org.apache.tinkerpop gremlin-python 3.2.2-SNAPSHOT | |
| # bin/gremlin-server.sh conf/gremlin-server-modern-py.yaml | |
| from gremlin_python.process.graph_traversal import GraphTraversal | |
| from gremlin_python.process.graph_traversal import GraphTraversalSource | |
| from gremlin_python.process.graph_traversal import __ | |
| from gremlin_python.process.traversal import Operator | |
| from gremlin_python.structure.io.graphson import GraphSONReader |
| module ActiveJobRetryControlable | |
| extend ActiveSupport::Concern | |
| DEFAULT_RETRY_LIMIT = 5 | |
| attr_reader :attempt_number | |
| module ClassMethods | |
| def retry_limit(retry_limit) | |
| @retry_limit = retry_limit |
| #!/bin/bash | |
| # Fetch 24-hour AWS STS session token and set appropriate environment variables. | |
| # See http://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html . | |
| # You must have jq installed and in your PATH https://stedolan.github.io/jq/ . | |
| # Add this function to your .bashrc or save it to a file and source that file from .bashrc . | |
| # https://gist.github.com/ddgenome/f13f15dd01fb88538dd6fac8c7e73f8c | |
| # | |
| # usage: aws-creds MFA_TOKEN [OTHER_AWS_STS_GET-SESSION-TOKEN_OPTIONS...] | |
| function aws-creds () { | |
| local pkg=aws-creds |
| -- HOWTO: | |
| -- after saving it, open with Script Editor (default) and run it | |
| -- PREREQUISITES: | |
| -- make sure your Keynote presentation is open in the background | |
| -- AFTER EXPORT: | |
| -- if you can't open the file due to encoding errors, open with Sublime (or another a text editor) and then "File / Save with encoding / UTF8" | |
| tell application "Keynote" |
| [Unit] | |
| Description=Keep reverse portforward tunnel | |
| After=network.target | |
| [Service] | |
| User=root | |
| Restart=always | |
| RestartSec=5 | |
| Type=simple | |
| ExecStart=/usr/bin/ssh -NTv \ |
type StringBool = "true"|"false";
interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };
type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];