Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# ディスクイメージファイルのパス
img_path="gpt.img"
echo "Creating empty image file"
dd if=/dev/zero of=$img_path bs=1G count=1
echo "Creating gpt table"
parted -s gpt.img mklabel gpt
# Server Core用のアプリケーション互換性を追加
Add-WindowsCapability -Online -Name ServerCore.AppCompatibility~~~~0.0.1.0
# Internet Explorer用のブラウザ機能を追加
DISM.exe /Online /Add-Capability /CapabilityName:Browser.InternetExplorer~~~~0.0.11.0
@mouseos
mouseos / bin-keyevent.c
Last active July 31, 2023 15:16
clova deskの/sysyem/bin/keyeventの逆コンパイル(binaryninja)
int64_t sub_1458()
{
/* jump -> data_4e50 */
}
void __libc_init(void* raw_args, void (* onexit)(),
int32_t (* main)(int32_t argc, char** argv, char** envp),
void const* structors) __noreturn
{
/* tailcall */
@mouseos
mouseos / keyevent.c
Created May 3, 2023 15:46
clova desk /bin/keyeventをretdecでデコンパイル
//
// This file was generated by the Retargetable Decompiler
// Website: https://retdec.com
//
#include <dirent.h>
#include <fcntl.h>
#include <pthread.h>
#include <signal.h>
#include <stdint.h>
@mouseos
mouseos / keyevent.c
Created May 3, 2023 15:55
clova desk /bin/keyevent hex-lays
/* This file was generated by the Hex-Rays decompiler version 8.2.0.221215.
Copyright (c) 2007-2021 Hex-Rays <[email protected]>
Detected compiler: GNU C++
*/
#include <defs.h>
//-------------------------------------------------------------------------
@mouseos
mouseos / clovwa-wave-bootlog.txt
Created May 8, 2023 06:04
clovwa waveのブートログ
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.1.2.C2-00030
S - IMAGE_VARIANT_STRING=DAASANAZA
S - OEM_IMAGE_VERSION_STRING=buildservera-All-Series
S - Boot Config, 0x000000e1
B - 1567 - PBL, Start
B - 4546 - bootable_media_detect_entry, Start
B - 49043 - bootable_media_detect_success, Start
﨤サ OK ] Stopped target Timers.
[ OK ] Stopped target Remote File Systems.
[ OK ] Stopped Daily Cleanup of Temporary Directories.
[ OK ] Stopped target Multi-User System.
Stopping leprop Service...
Stopping usb Service...
Stopping Modem Shutdown Service...
[ OK ] Removed slice system-serial\x2dgetty.slice.
Stopping logd Service...
Stopping System Logging Service...
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.1.2.C2-00030
S - IMAGE_VARIANT_STRING=DAASANAZA
S - OEM_IMAGE_VERSION_STRING=buildservera-All-Series
S - Boot Config, 0x000000e1
B - 1567 - PBL, Start
B - 4546 - bootable_media_detect_entry, Start
B - 49011 - bootable_media_detect_success, Start
B - 49015 - elf_loader_entry, Start
@mouseos
mouseos / img2html.py
Created May 30, 2023 02:59
画像(img1.jpg)をhtmlに変換する
from PIL import Image
image = Image.open("img1.jpg")
width, height = image.size
pixels = image.load()
print( "<style>.a{display:flex;} .b{width:1px; height:1px;}</style>")
for i in range(height):
print("<div class='a'>")
@mouseos
mouseos / fix_faust_juce_color.sh
Created June 2, 2023 05:46
faustのjuceプロジェクトで書きだすと色がおかしくなる問題を修正するスクリプト
#!/bin/bash
# ファイル名と置換前の行を指定します
file="FaustPluginProcessor.cpp"
target_line1="void FaustPlugInAudioProcessorEditor::paint (juce::Graphics& g)"
target_line2="virtual void paint(juce::Graphics& g) override"
target_line3="Name of the component is moved in Tab (so removed from component)"
target_line4="Drawing Scale"
target_line5="Display the name if it's needed"
target_line6="VUMeter Name"