Skip to content

Instantly share code, notes, and snippets.

View aimerneige's full-sized avatar
🎯
Keep Coding

Aimer Neige aimerneige

🎯
Keep Coding
View GitHub Profile
@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active May 28, 2024 17:40
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@aimerneige
aimerneige / sql2json.py
Last active April 25, 2023 09:59
read database and query all data into json
import os
import mysql.connector
# edit this to your database
mydb = mysql.connector.connect(
host="localhost",
user="root",
password="example",
database="example",
)
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<!-- Default system-ui fonts -->
<match target="pattern">
<test name="family">
<string>system-ui</string>
</test>
<edit name="family" mode="prepend" binding="strong">
@aimerneige
aimerneige / install-icalingua-plus-plus_rpm_x86_64.sh
Last active August 9, 2022 05:12
Install Icalingua-Plus-Plus
set -e
icalingua_latest_download_link=$(curl -s https://api.github.com/repos/Icalingua-plus-plus/Icalingua-plus-plus/releases/latest | grep browser_download_url | grep x86_64.rpm | cut -d '"' -f 4)
mkdir -p /tmp/Icalingua
wget ${icalingua_latest_download_link} -O /tmp/Icalingua/Icalingua.rpm
sudo dnf install /tmp/Icalingua/Icalingua.rpm
rm /tmp/Icalingua -rf
@aimerneige
aimerneige / ddlcpad.rs
Last active July 14, 2022 02:28
ddlcpad in rust
use std::fs::File;
use std::io::prelude::*;
fn main() {
let mut f = File::open("foo.cy").unwrap();
let mut buffer = Vec::new();
// read the whole file
f.read_to_end(&mut buffer).unwrap();
@ukazap
ukazap / chinese-input-fedora-35-kde.md
Last active August 13, 2023 12:50
How to set up Chinese input methods on Fedora 35 (KDE)

How to set up Chinese input methods on Fedora 35 (KDE)

Source: https://yanqiyu.info/2020/08/30/fcitx5-fedora/

Install fcitx5, fcitx5 configuration tool, Pinyin & Zhuyin input method engines

sudo dnf install -y fcitx5 kcm-fcitx5 fcitx5-chinese-addons fcitx5-table-extra fcitx5-zhuyin
@alyleite
alyleite / wsl.md
Last active June 16, 2024 06:32
Failed to connect to bus: Host is down - WSL 2

» sudo systemctl daemon-reload

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

==============================================

Edit*

  1. Open /etc/wsl.conf with any editor:
一.引言
1. 编写目的(阐明编写详细设计说明书的目的,指明读者对象。)
2. 项目背景(应包括项目的来源和主管部门等。)
3. 定义(列出文档中用到的专门术语定义和缩写词的原意。)
4. 参考资料(列出这些资料的作者、标题、编号、发表日期、出版单位或资料来源,可包括:
(1)项目的计划任务书,合同或批文;
(2)项目开发计划;
(3)需求规格说明书;
(3)概要设计说明书;
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<!-- Default system-ui fonts -->
<match target="pattern">
<test name="family">
<string>system-ui</string>
</test>
<edit name="family" mode="prepend" binding="strong">
@j-un
j-un / spotify.html
Last active June 11, 2024 03:14
[Hugo] Shortcode for Spotify embed code
<!--
Parameters:
type - (Required) album / track / playlist / artist
id - (Required) Target ID
width - (Optional) width
height - (Optional) height
-->
{{ if .IsNamedParams }}
<iframe src="https://open.spotify.com/embed/{{ .Get "type" }}/{{ .Get "id" }}"