Skip to content

Instantly share code, notes, and snippets.

View nwtgck's full-sized avatar
:octocat:
Feel free to make my English natural by native speakers

Ryo Ota nwtgck

:octocat:
Feel free to make my English natural by native speakers
View GitHub Profile
@nwtgck
nwtgck / proxy.pac
Last active November 3, 2021 15:54
function FindProxyForURL(url, host) {
return "SOCKS localhost:10080";
}
@nwtgck
nwtgck / openssl.cnf
Created March 24, 2020 14:20
/etc/pki/tls/openssl.cnf on centos:7 docker image
#
# OpenSSL example configuration file.
# This is mostly being used for generation of certificate requests.
#
# This definition stops the following lines choking if HOME isn't
# defined.
HOME = .
RANDFILE = $ENV::HOME/.rnd
name: "Comment run"
on:
issue_comment:
types: [created, edited]
jobs:
comment-run:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
(async () => {
// Get pull-req URL like "https://api.github.com/repos/nwtgck/actions-merge-preview/pulls/4"
const pullReqUrl = context.payload.issue.pull_request.url;
const githubUser = context.payload.repository.owner.login;
console.log({ githubUser });
const res = await fetch(pullReqUrl, {
headers: [
['Authorization', `Basic ${Buffer.from(`${githubUser}:${githubToken}`).toString('base64')}`]
]
});
version: '3.1'
services:
piping:
image: nwtgck/piping-server:v0.15.8
restart: always
ports:
- "80:80"
command: --http-port=80
@nwtgck
nwtgck / hello.txt
Last active January 22, 2020 12:46
hello, world
<html>
<head>
<title>Data URI Editor with LocalStorage</title>
<style>
@media (prefers-color-scheme: dark) {
body, input, textarea {
background: #333;
color: white;
}
::placeholder {
<input id="myinput">
<script>
const r = Math.random();
window.myinput.value = r;
console.log(r);
</script>
<input id="myinput">
<script>
const r = Math.random();
window.myinput.value = r;
console.log(r);
</script>
// kac-kac code is made by @abagames
// kac-kac is on https://github.com/abagames/kackac
// Load JS from URL
function loadScript(src) {
return new Promise((resolve, reject) => {
const script = document.createElement("script");
script.src = src;
script.onload = resolve;
document.head.appendChild(script);