Skip to content

Instantly share code, notes, and snippets.

View KiruyaMomochi's full-sized avatar
😸
Eat this meal I made!

百地 希留耶 KiruyaMomochi

😸
Eat this meal I made!
View GitHub Profile
@KiruyaMomochi
KiruyaMomochi / snapcraft.yaml
Last active May 22, 2022 04:33
dotnet-sdk 6.0.300 arm64 snap package
name: dotnet-sdk
version: 6.0.300
summary: Cross-Platform .NET Core SDK
description: |
.NET Core SDK. https://dot.net/core.
grade: devel
confinement: classic
apps:
dotnet:
@KiruyaMomochi
KiruyaMomochi / emsdk_pwsh_cross.patch
Last active March 27, 2022 23:50
Fix emsdk cros compile
diff --git a/emsdk.py b/emsdk.py
index c4fc19b..e618e37 100644
--- a/emsdk.py
+++ b/emsdk.py
@@ -2461,7 +2461,7 @@ def process_tool_list(tools_to_activate):
def write_set_env_script(env_string):
- assert(WINDOWS)
+ assert(CMD or POWERSHELL)
@KiruyaMomochi
KiruyaMomochi / libNBC-1.1.1_fix_s.patch
Last active March 27, 2022 04:52
Spack libNBC patch
--- ./nbc_ineighbor_alltoallv.c 2012-04-30 04:05:48.000000000 +0800
+++ /home/kyaru/nbc_ineighbor_alltoallv.c 2022-03-27 12:50:20.698116400 +0800
@@ -182,7 +182,7 @@
#ifdef HAVE_SYS_WEAK_ALIAS_PRAGMA
-NBC_F77_ALLFUNC_(nbc_ineighbor_alltoallv,NBC_INEIGHBOR_ALLTOALLV,(void *sbuf, int *scount, int *stype, void *rbuf, int *rcount,
+NBC_F77_ALLFUNC_(nbc_ineighbor_alltoallv,NBC_INEIGHBOR_ALLTOALLV,(void *sbuf, int *scounts, int *stype, void *rbuf, int *rcounts,
int *rtype, int *fcomm, int *fhandle, int *ierr));
#pragma weak NBC_INEIGHBOR_ALLTOALLV = nbc_ineighbor_alltoallv_f
@KiruyaMomochi
KiruyaMomochi / zz-update-systemd-boot
Last active June 15, 2023 06:48
Update `systemd-boot` after kernel update
#!/bin/bash
#
# This is a simple kernel hook to populate the systemd-boot entries
# whenever kernels are added or removed.
#
# Modified from https://blobfolio.com/2018/replace-grub2-with-systemd-boot-on-ubuntu-18-04/
# The UUID of your disk.
# Note: if using LVM, this should be the LVM partition.
UUID=$(findmnt -n / -o UUID)
@KiruyaMomochi
KiruyaMomochi / Enable-LoopbackExempt.psm1
Created November 25, 2021 15:09
Enable Loopback Exempt
function Get-SingleAppPackage {
param (
[Parameter(Mandatory = $true,
ValueFromPipeline = $true)]
[string]
$Name
)
$PackageNames = (Get-AppPackage).PackageFamilyName -match $Name
@KiruyaMomochi
KiruyaMomochi / ofed.psm1
Created November 21, 2021 14:52
MLNX_OFED download tool
$Script:Helper = "https://downloaders.azurewebsites.net/downloaders/mlnx_ofed_downloader/helper.php";
Class OfedVersions : System.Management.Automation.IValidateSetValuesGenerator {
[string[]] GetValidValues() {
return (Get-OfedVersions).versions
}
[string[]] $versions;
[string[]] $ga;
[string] $latest;
@KiruyaMomochi
KiruyaMomochi / frp-deb.sh
Created November 12, 2021 10:20
Build frp deb package
#!/bin/sh
TAB="$(printf '\t')"
curl -L 'https://github.com/fatedier/frp/releases/download/v0.38.0/frp_0.38.0_linux_amd64.tar.gz' -o frp-0.38.0.tar.gz
debmake -a frp-0.38.0.tar.gz
cd frp-0.38.0
sed 's/^\tdh \$@$/\tdh $@ --without autoreconf/g' debian/rules
tee -a debian/rules >> /dev/null << EOF
@KiruyaMomochi
KiruyaMomochi / srt-check.ps1
Last active September 7, 2021 08:17
Checking Priconne (Taiwan) SRT data
param (
[Parameter(ParameterSetName = "json", Mandatory)]
[string]
$SrtJson,
[Parameter(ParameterSetName = "objects", Mandatory, ValueFromPipeline)]
[pscustomobject[]]
$SrtPanels
)
class SrtPanel {
@KiruyaMomochi
KiruyaMomochi / cardioid-cmake.patch
Last active August 24, 2021 07:10
Cardioid CMake patch
diff --git a/elec/CMakeLists.txt b/elec/CMakeLists.txt
index 4a526cb..ccc5c76 100644
--- a/elec/CMakeLists.txt
+++ b/elec/CMakeLists.txt
@@ -271,7 +271,7 @@ function(get_recursive_list retvar target prop)
list(APPEND searched ${target})
#message(SEND_ERROR "=== ${target} ${prop} ${searched}")
- set(${retval} "")
+ set(retval "")