https://github.com/teppeis/closure-ts
異論は認めない。
#!/bin/bash | |
# run sudo apt update or similar and feed the password for the rest to run smooth | |
# this is for the old bash based on ubuntu 14.04 | |
sudo apt update && sudo apt dist-upgrade -y | |
# Instlall NodeJS, Yarn and npm related dependencies | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list |
const { spawn, spawnSync } = require('child_process'); | |
const readline = require('readline'); | |
const blame = spawn('git', ['blame', '--first-parent', process.argv[2]]); | |
const lines = readline.createInterface({ input: blame.stdout }); | |
const lookup = hash => { | |
const ret = spawnSync('git', ['show', '--oneline', hash]); | |
const msg = /Merge\s+(?:pull\s+request|pr)\s+\#?(\d+)\s/i; | |
const matcher = msg.exec(ret.stdout.toString()); |
description "Tomcat Server" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
# run as non privileged user | |
# add user with this command: | |
## adduser --system --ingroup www-data --home /opt/apache-tomcat apache-tomcat |
#! /bin/bash | |
# Description: show dependency tree | |
# Author: damphat | |
if [ $# -lt 1 ]; then | |
echo 'Usage: apt-rdepends-tree [-r] <package>' | |
echo 'Required packages: apt-rdepends' | |
exit 1 | |
fi |
package de.am.gc.benchmarks; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* GC benchmark producing a mix of lifetime=0 and lifetime>0 objects which are kept in randomly updated lists. | |
* | |
* @author jsound | |
*/ |
(by @andrestaltz)
So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).
Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:
Rx.Observable.prototype.flatMapLatest(selector, [thisArg])
Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.
オリジナルは力武さんの投稿 http://erlang-users.jp/ml/erlang/index.cgi?0::166 | |
アキュムレータ accumulator | |
アノテーション annotation | |
アリティ arity | |
ー致条件 match specification | |
入れ子リスト deep list | |
インターフェイス interface | |
エクスポート export |
#! /your/favourite/path/to/ruby | |
# -*- coding: utf-8 -*- | |
# Copyright (c) 2013 Urabe, Shyouhei | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
var exports = {}; | |
// parse URI | |
exports.parse_url = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/; | |
exports.names = ['url', 'scheme', 'slash', 'host', 'port', 'path', 'query', 'hash']; | |
exports.blanks = '@'; | |
// parse number | |
exports.parse_number = /^-?\d+(?:\.\d*)?(?:e[+\-]?\d+)?$/i; |