Skip to content

Instantly share code, notes, and snippets.

View kent013's full-sized avatar

ISHITOYA Kentaro kent013

View GitHub Profile
@roommen
roommen / OpenSSH Update Script - Amazon Linux 2
Last active April 25, 2024 08:27
OpenSSH Update Script - Amazon Linux 2
#!/bin/bash
sudo yum install gcc -y
sudo yum install openssl-devel -y
sudo yum install zlib-devel -y
sudo yum install mlocate -y
sudo yum install autoconf -y
wget https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.1p1.tar.gz
tar zxvf openssh-9.1p1.tar.gz
cd openssh-9.1p1 && ./configure && make && sudo make install
#!/usr/bin/env perl
# Copyright (c) 2015 Sergey Lyubka
# All rights reserved
use Encode;
my $dir = "/Users/$ENV{USER}/.Trash";
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; }
@kijtra
kijtra / syllabary.kana.php
Last active October 23, 2018 11:27
[PHP] 文字列の先頭文字がアカサタナ行のどれかを取得する関数。
<?php
/* カタカナ限定で高速化したもの */
function syllabary($str){
$charset='utf-8';
if(empty($str)){
return false;
}
$dic=array(
'ア'=>'ア','イ'=>'ア','ウ'=>'ア','エ'=>'ア','オ'=>'ア',
'カ'=>'カ','キ'=>'カ','ク'=>'カ','ケ'=>'カ','コ'=>'カ',