Skip to content

Instantly share code, notes, and snippets.

View p-x9's full-sized avatar
🤩

p-x9

🤩
View GitHub Profile
@p-x9
p-x9 / create-xcframework.sh
Last active February 26, 2024 13:33
Create xcframework from Swift Package
set -Ceu
PACKAGE_DIR=$(
cd "$(dirname "$0")/.." || exit 1
pwd
)
cd "${PACKAGE_DIR}" || exit 1
DERIVED_DATA_PATH=".build"
OUTPUT="XCFrameworks"
@p-x9
p-x9 / DynamicMemberModifier.swift
Last active November 26, 2022 20:54
Modifierを簡単に定義する方法を考えたい
import Foundation
@dynamicMemberLookup
struct DynamicMemberWrap<T: AnyObject> {
private var value: T
init(_ value: T) {
self.value = value
}
@p-x9
p-x9 / SailorMoonBash.sh
Created July 20, 2022 17:20
rootに変わってお仕置きされます
# add the following code to your .bashrc
sudo() {
local ARGS="${@:1}"
while (( $# > 0 ))
do
case $1 in
-u | --user | --user=*)
if [[ "$1" =~ ^--user= ]]; then
local SELECTED_USER=$(echo $1 | sed -e 's/^--user=//')
@p-x9
p-x9 / Matrix-multiplication.bas
Created March 22, 2021 16:36
[VBA]行列の掛け算
Function multiplication(a, x)
Dim ans() As Double
ReDim ans(UBound(a), UBound(x, 2))
For i = 1 To UBound(a)
For j = 1 To UBound(x, 2)
ans(i, j) = 0
For k = 1 To UBound(a, 2)
ans(i, j) = ans(i, j) + a(i, k) * x(k, j)
Next
Next j