Skip to content

Instantly share code, notes, and snippets.

View toshimaru's full-sized avatar

Toshimaru toshimaru

View GitHub Profile
@toshimaru
toshimaru / 0_command.md
Last active August 15, 2024 02:20
A `php.ini` file of Remi PHP 7.3.

Remi PHP 7.3 php.ini

This is a php.ini file for PHP v7.3 which is installed via remi repository,

$ cat /etc/opt/remi/php73/php.ini
@toshimaru
toshimaru / 0-ruby-command.md
Last active August 15, 2024 02:24
raiils コマンド解説。

Ruby Docker イメージ起動

docker run -it ruby:3.3 bash
root@49041da525d4:/# ruby -v
ruby 3.3.4 (2024-07-09 revision be1089c8ec) [aarch64-linux]
@toshimaru
toshimaru / enable-mcrypt-docker-php.md
Last active September 3, 2024 08:07
Convert PHP `mcrypt_encrypt` fucntion to `openssl_encrypt` function. Blog: https://blog.toshima.ru/2024/07/28/mcrypt-encrypt-to-openssl-encrypt.html

Launch php:7.2 image

$ docker run -it php:7.2 bash

Install mcrypt

# apt update && apt install -y libmcrypt-dev
@toshimaru
toshimaru / deploy.yml
Created July 5, 2024 09:13
Sample jekyll build workflow using `actions/deploy-pages`.
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages
on:
# Runs on pushes targeting the default branch

Keybase proof

I hereby claim:

  • I am toshimaru on github.
  • I am toshimaru (https://keybase.io/toshimaru) on keybase.
  • I have a public key ASATLhYY9BQNHkXYPQ0wypk5wnZ0dkqMZZEKSnCJdexxFAo

To claim this, I am signing this object:

@toshimaru
toshimaru / 01_prompt.md
Last active July 17, 2023 00:41
10以下の簡単な足し算・引き算。

答えが10以下の1を含む足し算・引き算を30問作成してください。 問題は2列のmarkdown形式の表にまとめてください。


もちろんです。以下に指定の形式で30問の問題をまとめました:

問題 問題
1 + 4 = ? 6 - 1 = ?
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "activerecord"
gem "sqlite3"
gem "enumerize" #, '2.6.1'
@toshimaru
toshimaru / macos-sips-command-manual
Created June 30, 2023 05:51
The result of `man sips` on macOS.
sips(1) General Commands Manual sips(1)
NAME
sips – scriptable image processing system.
SYNOPSIS
sips [image-functions] imagefile ...
sips [profile-functions] profile ...
DESCRIPTION
@toshimaru
toshimaru / file-check.bash
Last active June 27, 2023 06:35
A simple bash script that checks for the existence of specified files:
#!/bin/bash
# Define the list of file paths
filelist=(
"config/database.yml"
"config/setting.yml"
"config.yml"
)
# Check for the existence of each file