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
Codename Version
Build
PHP Python Ruby Perl
Mac OS X
Lion
10.7.5
Build 11G63
5.3.15 2.7.1 1.8.7 5.12.3
OS X
Mountain Lion
10.8.5
Build 12F2560
5.3.29 2.7.2 1.8.7 5.12.4
OS X
Mavericks
10.9.5
Build 13F1112
5.4.43 2.7.5 2.0.0p481 5.16.2
OS X
Yosemite
10.10.5
Build 14F2511
5.5.38 2.7.10 2.0.0p481 5.18.2
OS X
El Capitan
10.11.6
Build 15G19009
5.5.38 2.7.10 2.0.0p648 5.18.2
macOS
Sierra
10.12.5
Build 16F73
5.6.30 2.7.10 2.0.0p648 5.18.2
macOS
High Sierra
10.13.4
Build 17F199
7.1.14 2.7.10 2.3.3p222 5.18.2
macOSMojave 10.14.6Build 18G103 7.1.23 2.7.10 2.3.7p456 5.18.4