Skip to content

Instantly share code, notes, and snippets.

View uzulla's full-sized avatar
🚧
WORK,WORK,WORK.

uzulla / Junichi Ishida uzulla

🚧
WORK,WORK,WORK.
View GitHub Profile
@uzulla
uzulla / disable_useless_services.ps1
Last active April 15, 2025 23:32
Windowsで不要とされるサービスを停止(手動化)して高速化(できるかもしれない)スクリプト、当然無保証
# PowerShell 5では動作しません、PowerShell7をインストールして管理者権限で実行してください
# 例:
# winget install Microsoft.PowerShell
# PowerShell7を管理者権限で起動し…
# .\disable_useless_services.ps1
# 管理者権限の確認
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Host "このスクリプトは管理者権限で実行する必要があります。"
exit
#cloud-config for xubuntu 24.04
autoinstall:
version: 1
identity:
hostname: plain-xubuntu
username: doe
password: "$6$aW3pQdLQ05RQoG0M$sTFlndcayhG3rlB0j.kTOh0499JmqzcoQI.uGaz0xjJ/0ifSpU59.gqf4NcnXGV4e4kLA5IybQ70S2d1P301d1"
ssh:
install-server: true
allow-pw: false
@uzulla
uzulla / stop-all-docker-compose.sh
Last active July 21, 2022 07:09
stop running docker-compose containers in anywhere
#!/bin/sh
docker ps --filter 'label=com.docker.compose.project.config_files' --format '{{ .Labels }}' | sed 's/,/\n/g' | grep com.docker.compose.project.config_files | uniq | cut -d = -f 2 | xargs -I {} -L 1 docker-compose -f {} stop
# use jq
# docker ps --format '{{json .Labels}}' | xargs echo | sed "s/,/\n/g" |grep com.docker.compose.project.config_files | cut -d = -f 2|uniq | xargs -I {} -L 1 docker-compose -f {} stop
<?php
// dump list attendees from eventbrite event.
$conf = include("config.php");
// the config php like as
// <?php
//
// return [
// "token"=>"***",
// "event_id"=>"1234567890",
// ];
<?php
function stopwatch($str = null)
{
static $time = null;
if (is_null($str)) {
$time = microtime(true);
} else {
echo $str . ( microtime(true) - $time) . "sec" . PHP_EOL;
$time = 0;
}
@uzulla
uzulla / kakedashi.md
Last active May 8, 2021 07:37
以前しらべた「駆け出しエンジニア」ハッシュタグについての個人的メモ

まえがき

駆け出しエンジニアハッシュタグについて前ちょっと調べたことを残しておく、これは単なる私の調べたメモです。

間違っている、押さえきれていない、見逃している可能性も沢山ありますので、注意してください

調査は

  • twitter検索
  • Google
  • Google Trend
#!/bin/sh
# `convert` command is part of ImageMagick, apt install imagemagick, brew install imagemagick or ....
convert -threshold 30000 src.png tmp.jpg
# ^~~~ bad output? ok, try change here as you like!!!
# Wow, you need negative ? ok.
# convert -negate tmp.jpg tmp2.jpg
# mv tmp2.jpg tmp.jpg
@uzulla
uzulla / sha256_seed_resolver.php
Last active June 4, 2023 00:21
SHA256の逆変換を力技で行う(半分ジョーク)プログラムです。 ( https://github.com/uzulla/sha256-resolver.php にFork版をつくりました)
<?php
// TTILE: SHA256 hash seed resolver (as a joke).
// AUTHOR: uzulla(Junichi ISHIDA) <[email protected]>
// LICENSE: MIT (https://opensource.org/licenses/MIT)
//
// ## requirement
// php>=7, need GMP extention
//
// ## how to use
// $ php sha256_seed_resolver.php fb8e20fc2e4c3f248c60c39bd652f3c1347298bb977b8b4d5903b85055620603
@uzulla
uzulla / composer.json
Created January 5, 2021 02:15
some amphp bench code
{
"require": {
"amphp/amp": "^2.5",
"amphp/dns": "^1.2",
"amphp/http-client": "^4.5"
}
}
open http://github.com/uzulla/Tinitter/blob/`git branch |cut -f 2 -d ' '`/templates/frame.twig#L10