Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
var p = console.log.bind(console); | |
var q = require('readline-sync').question; | |
var gcd = (a, b) => !b ? a : gcd(b, a % b); | |
var r = () => Math.floor(Math.random()*9)+1 | |
var i = 1; | |
for(;;) { | |
var x = r(); | |
var y = r(); | |
var df = x % y === 0; | |
if(df) continue; |
<script type="text/javascript"> | |
function loadIframelyEmbedJs() { | |
// Replace 'iframe.ly' with your custom CDN if available. | |
if (document.querySelectorAll("[data-iframely-url]").length === 0 | |
&& document.querySelectorAll("iframe[src*='iframe.ly']").length === 0) return; | |
var iframely = window.iframely = window.iframely || {}; | |
if (iframely.load) { | |
iframely.load(); | |
} else { | |
var ifs = document.createElement('script'); ifs.type = 'text/javascript'; ifs.async = true; |
import System.Random (RandomGen, getStdGen, randoms) | |
import Control.Concurrent (threadDelay) | |
import System.Process (callCommand) | |
import Data.List.Split (chunksOf) | |
import Data.Maybe (fromMaybe) | |
type Cell = Bool | |
type CellTable = [[Cell]] | |
type Score = Int | |
type Pos = (Int, Int) |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
We are building a Node.js service which will need asynchronous support for tasks like sending emails. Here's our evaluation:
これらのファイルはそれぞれのsrc/config.tsを参考にしている。
WebについてはTravis Ciでビルドが通った最後のコミットDisplay title時を参考にしている。
現在は以降のコミットによりWebのjsonの書式が変更になっているので注意。
またWebのみビルド時に設定ファイルが存在しないとビルドできない。
node、mongoDB、redis、graphicsmagickが動作する環境であれば問題がない
確認が取れているのはArchLinux、Ubuntu 16.04
# Misskey API Configuration | |
### サーバーの管理者情報 | |
# ex) "Your Name <[email protected]>" | |
maintainer: <string> | |
### APIアクセス時のパスワード | |
apiPass: <string> | |
### アクセスするときのドメイン |
So, with credit to the Factorio wiki and cbednarski's helpful gist, I managed to eventually setup a Factorio headless server. Although, I thought the process could be nailed down/simplified to be a bit more 'tutorialised' and also to document how I got it all working for my future records.
The specific distro/version I'm using for this guide being Ubuntu Server 16.04.1 LTS
. Although, that shouldn't matter, as long as your distro supports systemd
(just for this guide, not a Factorio headless requirement, although most distros use it as standard now).
The version of Factorio I shall be using is 0.14.20
, although should work for any version of Factorio 0.14.12
and higher.
Just a note to newcomers: If there are any issues with the installation steps, people in the comments are doing a good job
//: Playground - noun: a place where people can play | |
let クチャクチャ = 0 | |
let 早口 = 0 | |
let アディダスの財布 = 0 | |
let ドヤ顔 = 0 | |
let ギトギトの髪 = 0 | |
let 運動靴 = 0 | |
let 細い目 = 0 | |
let 汚いメガネ = 0 |
// Parse a document using "offside rule" indentation (as in Python) into lines | |
// grouped by indentation level, using PEG.js. | |
// Attempts to segregate the "stateful" rules from the other production/parsing | |
// rules by "disallowing" indentation-level-sensitive rules from consuming any | |
// text. | |
{ var margin_stack = [""]; } | |
Document | |
= content: Element+ |