Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

yaasita yaasita

💭
I may be slow to respond.
View GitHub Profile
View systemd-nspawn@.service
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Container %i
Documentation=man:systemd-nspawn(1)
View xvfb.service
[Unit]
Description=Xvfb
After=multi-user.target
[Service]
ExecStart=/usr/bin/Xvfb :1
User=vimmer1
Group=vimmer1
Restart=always
RestartSec=30
View hankaku.vim
command! HankakuSpace call HankakuSpace()
command! ZenkakuSpace call ZenkakuSpace()
function! HankakuSpace() "{{{2
syntax match HankakuSpace / /
redir => l:hi
highlight HankakuSpace
redir END
if match(l:hi,'cleared') >= 0
highlight! default link HankakuSpace TabLine
else
View Dockerfile
# Use the latest perl image from dockerhub
FROM perl:latest
# Install the web framework mojolicious
RUN curl -L https://cpanmin.us | perl - -M https://cpan.metacpan.org -n Mojolicious
# Instruct mojolicious to listen on port 8080 and open the port
ENV MOJO_LISTEN http://*:8080
EXPOSE 8080
View ssl-check-in-bashrc.sh
function ssl_check { #{{{
local OPT
OPTIND=1
local usage="usage: ssl_check [-v] [-s sni_servername] -c host[:port]"
if [ "$#" -lt 1 ]; then
echo $usage
return
fi
while getopts "hvs:c:" OPT
View type-change.sh
#!/bin/bash
set -eu
function recreate {
cat <<EOF > /tmp/query.sql
#standardSQL
SELECT CAST(id as STRING) as id, description FROM test.first WHERE DATE(_PARTITIONTIME) = "$1";
EOF
export partition=$(echo $1 | perl -ple 's/-//g')
View retry.md

リトライのログ

回数 時刻
1 Apr 29, 2020 5:27:55 AM
2 Apr 29 2020 5:33:00 AM
3 Apr 29, 2020 5:38:11 AM
4 Apr 29, 2020 5:43:22 AM
5 Apr 29, 2020 5:48:31 AM
6 Apr 29, 2020 5:53:41 AM
View index.js
const express = require("express");
const app = express();
const port = 3000;
const concat = require("concat-stream");
app.use(function (req, res, next) {
req.pipe(
concat(function (data) {
req.body = data;
next();
})
View run.js
#!/usr/bin/env node
"use strict";
const fs = require("fs");
const req = {
method: "POST",
headers: {
host: "localhost:3000",
"user-agent": "curl/7.68.0",
accept: "*/*",
"content-length": "141",
You can’t perform that action at this time.