Skip to content

Instantly share code, notes, and snippets.

View koichirok's full-sized avatar

Koichiro KIKUCHI koichirok

View GitHub Profile
@koichirok
koichirok / podma-compose-devcontainer-wrapper
Created April 14, 2023 08:02
A shell script to wrap `podman-compose config` command to make paths in output absolute
#!/bin/sh
#
# podman-compose wrapper to make relative paths in output of `config` command absolute.
# Currently only paths in build.context and volumes are converted.
#
# path to the podman-compose executable to wrap
PODMAN_COMPOSE="/usr/bin/podman-compose"
COMMAND=""
@koichirok
koichirok / ansible-convert-externally-obtained-string-yes-to-true.yml
Last active April 3, 2022 19:29
ansible cannot store the externally obtained string "yes" as-is as "fact"
---
- name: host
hosts: localhost
gather_facts: false
tasks:
- block:
- name: show ansible version
ansible.builtin.debug:
var: ansible_version.full
@koichirok
koichirok / testlink-xml-to-csv.py
Last active July 9, 2022 16:25
Small Python 2 script to convert exported TestLink test cases (test suite) to CSV.
@koichirok
koichirok / wetty
Last active June 14, 2019 13:46
FreeBSD rc script for wetty (https://github.com/krishnasrinivas/wetty)
#!/bin/sh
#
# $FreeBSD: $
#
# PROVIDE: wetty
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following to /etc/rc.conf[.local] to enable this service
#
@koichirok
koichirok / check-source-ip.html
Last active November 12, 2018 05:16
selenese version of source ip address check script
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://www.google.com/" />
<title>Check source IP address</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
I 2017-07-13 16:04:30:737 server.cc(86) Starting WebDriver server on port: '36390' on host: ''
T 2017-07-13 16:04:30:737 server.cc(630) Entering Server::PopulateCommandRepository
T 2017-07-13 16:04:30:737 IEServer.cpp(32) Entering IEServer::IEServer
I 2017-07-13 16:04:30:737 IEServer.cpp(33) Driver version: 3.4.0.0 (32-bit)
T 2017-07-13 16:04:30:737 server.cc(121) Entering Server::Start
D 2017-07-13 16:04:30:737 server.cc(148) Civetweb ACL is -0.0.0.0/0,+127.0.0.1
T 2017-07-13 16:04:31:146 server.cc(174) Entering Server::ProcessRequest
T 2017-07-13 16:04:31:146 server.cc(183) Process request with: URI: /status HTTP verb: GET
body: {}
T 2017-07-13 16:04:31:146 server.cc(272) Entering Server::DispatchCommand
@koichirok
koichirok / itmediaPR.user.js
Last active July 20, 2016 07:35 — forked from anonymous/itmediaPR
itmediaPR
// ==UserScript==
// @name itmediaPR
// @namespace itmediaPR
// @description itmediaのPR記事を分かりやすくする
// @include http://www.itmedia.co.jp/*
// @version 1
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
// ==/UserScript==
--- /etc/rc.d/mountd.orig 2015-11-03 05:12:28.000000000 +0900
+++ /etc/rc.d/mountd 2015-12-16 20:41:43.728997000 +0900
@@ -42,5 +42,7 @@
err 1 'Cannot create /var/db/mountdtab'
}
+load_rc_config nfsd
+load_rc_config zfs
load_rc_config $name
run_rc_command "$1"
--- /etc/rc.d/jail.orig 2015-05-25 02:26:45.946557785 +0900
+++ /etc/rc.d/jail 2015-05-25 02:45:37.390052065 +0900
@@ -37,7 +37,7 @@
extract_var()
{
local i _j _name _param _num _def _name1 _name2
- _j=$1
+ _j=$(echo $1 | tr - _)
_name=$2
_param=$3