Skip to content

Instantly share code, notes, and snippets.

View Aries0d0f's full-sized avatar
🐈

Aries Cs Aries0d0f

🐈
View GitHub Profile
@zmxv
zmxv / ccba.py
Created April 1, 2026 05:13
Claude Code buddy animation
#!/usr/bin/env python3
"""Generate an animated GIF of all companion sprite animations."""
from PIL import Image, ImageDraw, ImageFont
# --- Sprite data ---
SPECIES = [
'duck', 'goose', 'blob', 'cat', 'dragon', 'octopus', 'owl', 'penguin',
'turtle', 'snail', 'ghost', 'axolotl', 'capybara', 'cactus', 'robot',
@coodoo
coodoo / outline_1.md
Created February 1, 2026 12:49
「第一屆 AI 取暖會」講義文字稿。欲收到之後活動報名通知請前往此頁登記:https://forms.gle/H3Xa4fseQNoBz3qS8

"ai agent 原理、應用與展望與挑戰"

chatbot 原理

- turn by turn 示範

	[
		'user: 你好',

'AI: hi how mayi help?',

MD5 Collision with CRC32 Preimage

Here's the scenario: We want to craft two different messages with the same MD5 hash, and a specific CRC32 checksum, simultaneously.

In other words, we want an MD5 collision attack and a CRC32 preimage attack.

This might seem like a contrived scenario, but it's exactly the one I faced while producing my PNG hashquine (Yes OK maybe that's also a contrived scenario, cut me some slack).

On its own, a CRC32 preimage attack is trivial. You can craft a 4-byte suffix that gives any message a specific checksum, calculated using a closed-form expression (which I am too lazy to derive, not even with assistance from Z3). It's not an attack per-se, since CRC32 was never meant to be cryptograpically secure in the first place.

@munrocket
munrocket / wgsl_2d_sdf.md
Last active November 2, 2025 16:46
WGSL 2D SDF Primitives

WGSL 2D SDF Primitives

Revision: 06.08.2023, https://compute.toys/view/398

Circle - exact

fn sdCircle(p: vec2f, r: f32) -> f32 {
  return length(p) - r;
}
@munrocket
munrocket / wgsl_3d_sdf.md
Last active April 23, 2026 20:55
WGSL 3D SDF Primitives

WGSL 3D SDF Primitives

Revision: 06.08.2023, https://compute.toys/view/407

Sphere - exact

fn sdSphere(p: vec3f, r: f32) -> f32 {
  return length(p) - r;
}
@naveenkrdy
naveenkrdy / AdobeAMDFix.md
Last active March 29, 2026 19:37
To fix adobe products crashes on AMD hackintosh

Adobe Crash Fix XLNC

Instructions

  1. Install needed adobe apps from adobe creative cloud.

  2. Open Terminal.

  3. Copy-paste the below command to your terminal and run it (enter password when asked).

@mattn
mattn / README.md
Last active February 25, 2025 15:03
blacklist/whitelist master/slave に関する情報集め

blacklist/whitelist master/slave に関する情報集め

blacklist/whitelist、master/slave という単語は相応しくないという意見に OSS がどの様に対応すべきかを自身で考える為の情報集めです。見つけ次第、逐次更新していきます。

僕(mattn) 自身は black lives matter に同意をしています。blacklist/whitelist、master/slave という単語を廃止する事が、歴史的背景を持たない文化圏では特定の意味を持たなかった為、個人的には若干思う所はありますが、廃止自身に反対するつもりはありません。

昔から、主副を表す物には master/slave という単語が使われてきました。ハードディスクの IDE、仮想端末(pty)、色々あります。またネットワークの IP フィルタリングに関しては blacklist/whitelist と表記した物が今でも沢山あります。

我々日本人が意識せずに使っていた blacklist/whitelist、master/slave という単語が、人々にどの様に影響しうるのか、今後 OSS としてどの様に関わっていけば良いかを理解する上で、自分なりの情報集めをしたいと思っています。

#sudo lastb -ai | head -n-2 | awk '{print$NF}' | awk '/[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+/{print}' | sort -t. -k1,1n -k2,2n -k3,3n -k4,4n | uniq --count | awk '$1>9{print$2}' > failed.ip.9
sudo lastb -ai | head -n-2 | awk '{print$NF}' | awk '/[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+/{print}' | sort | uniq --count | awk '$1>9{print$2}' > failed.ip.9
for ip in $(cat failed.ip.9); do
sudo firewall-cmd --permanent --zone=public --add-rich-rule="rule family='ipv4' source address='$ip' reject"
done
sudo firewall-cmd --reload
@MarkZhangTW
MarkZhangTW / curl.time.sh
Last active April 10, 2020 06:03
Curl format for displaying time infomation.
#!/usr/bin/env bash
# Reference: https://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl
curl_format="\
%{time_namelookup}:\
%{time_connect}:%{time_appconnect}:\
%{time_pretransfer}:%{time_redirect}:\
%{time_starttransfer}:%{time_total}"
curl_result=$(echo "$curl_format" | curl -s -o /dev/null -w @- $@)
IFS=':' read -r -a array <<< "$curl_result"
@srstsavage
srstsavage / nginx_google_analytics
Last active August 6, 2025 05:27
google analytics in nginx
# send logs for all traffic (including non-html) to google analytics
#
# in server block:
# set $google_analytics_id "UA-THECORRECT-ID";
# include /srv/nginx/google_analytics;
#
# in location blocks:
# post_action @ga;
#
# notes: post_action has been referred to by nginx devs as a "dirty hack" and this approach may stop working one day.