This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ARCHIVE="$1" | |
TARGET="$2" | |
find "$TARGET" -exec touch -t 198001010000 '{}' + | |
find "$TARGET" -print0 | tr '\0' '\n' | LC_ALL=C sort | zip -@ -X "$ARCHIVE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import json | |
import sys | |
__author__ = "Amane Katagiri" | |
__contact__ = "amane@ama.ne.jp" | |
__copyright__ = "Copyright (C) 2018 Amane Katagiri" | |
__credits__ = ["Amane Katagiri", ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GNU AFFERO GENERAL PUBLIC LICENSE | |
Version 3, 19 November 2007 | |
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> | |
Everyone is permitted to copy and distribute verbatim copies | |
of this license document, but changing it is not allowed. | |
Preamble | |
The GNU Affero General Public License is a free, copyleft license for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>チェックボックスでスタイルを切り替える</title> | |
<style> | |
#main { | |
background-color: red; | |
} | |
input[type="checkbox"]#toggle:checked ~ #main { | |
color: #eee; | |
background-color: blue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.h-entry { | |
min-width: 80%; | |
min-height: 0; | |
} | |
.h-entry main { | |
margin: 0 20px; | |
} | |
.card h3 { | |
margin: 20px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Generate a DNSSEC DS record based on the incoming DNSKEY record | |
The DNSKEY can be found using for example 'dig': | |
$ dig DNSKEY secure.widodh.nl | |
The output can then be parsed with the following code to generate a DS record | |
for in the parent DNS zone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ue | |
VERSION="$1" | |
sudo apt install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev \ | |
libjpeg-dev libncurses5-dev libncursesw5-dev liblzma-dev tk-dev xz-utils libffi-dev \ | |
libgdbm-dev libdb-dev libffi-dev uuid-dev wget | |
cd /tmp | |
wget -O - "https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz" | tar zxvf - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -Ceu | |
URL_ROOT='https://anime.dmkt-sp.jp/animestore/rest/WS000108' | |
LENGTH=300 | |
for KANA_COLUMN in $(seq 1 10); do | |
for KANA_ROW in $(seq 1 5); do | |
TEMP=$(mktemp) | |
curl -o $TEMP -Ss "$URL_ROOT"'?workTypeList=anime&length='"$LENGTH"'&initialCollectionKey='"$KANA_COLUMN"'&consonantKey='"$KANA_ROW"'&vodTypeList=svod_tvod' | |
ERROR="$(cat $TEMP | jq -r '.error.code')" | |
if [ "$ERROR" == "null" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"web": | |
{ | |
"client_id": "XXX", | |
"project_id": "XXX", | |
"auth_uri":"https://accounts.google.com/o/oauth2/auth", | |
"token_uri": "https://oauth2.googleapis.com/token", | |
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", | |
"client_secret": "XXX", | |
"redirect_uris": ["http://localhost:8080/"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
GIRON_URL='https://rara.jp/giron/photo' | |
DOWNLOAD_DIR=$HOME/Pictures/tmp | |
MAX_PAGE=10 | |
CURSOR=$DOWNLOAD_DIR/.last_download_url | |
VERBOSE=0 | |
CURL_OPT="-Ss" | |
if [ $# -gt 0 ]; then | |
if [ "$1" = "-v" ]; then |