Skip to content

Instantly share code, notes, and snippets.

View syuilo's full-sized avatar
🥺

syuilo syuilo

🥺
  • Earth
  • 18:36 (UTC +09:00)
View GitHub Profile
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)
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
@twolfson
twolfson / README.md
Last active August 1, 2023 10:45
Node.js job queue evaluation

We are building a Node.js service which will need asynchronous support for tasks like sending emails. Here's our evaluation:

@otofune
otofune / README.md
Last active January 24, 2017 08:31
Misskey Config Sample

Misskey 設定ファイル サンプル集

情報

これらのファイルはそれぞれのsrc/config.tsを参考にしている。
WebについてはTravis Ciでビルドが通った最後のコミットDisplay title時を参考にしている。
現在は以降のコミットによりWebのjsonの書式が変更になっているので注意。
またWebのみビルド時に設定ファイルが存在しないとビルドできない。

必須環境

node、mongoDB、redis、graphicsmagickが動作する環境であれば問題がない
確認が取れているのはArchLinux、Ubuntu 16.04

@otofune
otofune / config-template.yml
Last active July 23, 2016 02:08
misskey-core's config-template
# Misskey API Configuration
### サーバーの管理者情報
# ex) "Your Name <[email protected]>"
maintainer: <string>
### APIアクセス時のパスワード
apiPass: <string>
### アクセスするときのドメイン
@othyn
othyn / factorio_headless_guide.md
Last active April 13, 2025 18:46
How to setup a Factorio Headless Server

[LINUX] Factorio Headless Server Guide

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

@xreiju
xreiju / Contents.swift
Last active July 13, 2020 11:59
オタクの過激発言の再現を可能にするコードです。
//: Playground - noun: a place where people can play
let クチャクチャ = 0
let 早口 = 0
let アディダスの財布 = 0
let ドヤ顔 = 0
let ギトギトの髪 = 0
let 運動靴 = 0
let 細い目 = 0
let 汚いメガネ = 0
@biogeo
biogeo / indentation.pegjs
Created March 23, 2017 17:55
"Offside rule" indentation parsing with PEG.js
// 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+