This file contains hidden or 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
# print_long - Print long text with pypager | |
# | |
# Requirement: pypager package | |
# | |
# This script provides a function to display long text in a paginated manner using the pypager package. | |
# If the text fits within a single page, it will be printed directly to the console. If the text spans | |
# multiple pages, it will be displayed using pypager to allow for easy navigation through the content. | |
# | |
# Usage: | |
# 1. Ensure you have pypager installed: |
This file contains hidden or 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
port = 5555 | |
url = http://localhost:$(port)/ | |
container = jekyll | |
image = $(container):1.0 | |
repo = /Users/seki/git/sekika.github.io | |
www = /jekyll | |
mount = --mount type=bind,source=$(repo),destination=$(www) | |
all: | |
cat Readme.md |
This file contains hidden or 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 | |
cd /jekyll | |
rm -f Gemfile.lock | |
bundle install | |
bundle update --bundler | |
bundle exec jekyll serve --drafts --host 0.0.0.0 |
This file contains hidden or 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
FROM ruby:alpine | |
# Install package | |
RUN apk update && apk --no-cache upgrade && \ | |
apk add --no-cache build-base | |
# Copy entrypoint script and set permissions | |
COPY entrypoint.sh /bin/entrypoint.sh | |
RUN chmod +x /bin/entrypoint.sh |
This file contains hidden or 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 | |
"""Concatenate PDF images with multiple images on a single page | |
This is a Python script designed to concatenate PDF images into | |
a single file. The script arranges multiple PDF images both | |
horizontally and vertically on a single page, allowing for | |
customizable image counts along each axis. This results in | |
multiple pages being generated. | |
In stalled required library by the following command: |
This file contains hidden or 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
import discord | |
class Client(discord.Client): | |
async def on_ready(self): | |
if hasattr(self, 'action'): | |
for action in self.action: | |
if action[0] == 1: | |
user = await self.fetch_user(action[1]) |
This file contains hidden or 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
syntax on | |
set autoindent | |
set expandtab | |
let _curfile=expand("%:r") | |
if _curfile == 'Makefile' | |
set noexpandtab | |
endif | |
set tabstop=4 | |
set shiftwidth=4 | |
set cursorline |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>パスワード</title> | |
<style type="text/css"> | |
fieldset { |
This file contains hidden or 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 -*- | |
# パスワード生成プログラム | |
# | |
# このプログラムに関する記事「パスワードの管理について」 | |
# https://sekika.github.io/2017/05/09/Password/ | |
# | |
# 使い方:プログラムのソースコードに直接サイト情報を書く。 | |
# サイト情報は、サイト名、ハッシュ関数、文字種、文字数、パスワードの種の5つ。 |
This file contains hidden or 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 | |
# Primality quiz | |
# Use the commandline argument "p" to show the list | |
# | |
# http://sekika.github.io/2016/12/13/Primality/ | |
### Parameters | |
rep=10 # Numbers of questions |
NewerOlder