Skip to content

Instantly share code, notes, and snippets.

@AlephAlpha
AlephAlpha / PKGBUILD
Last active Nov 9, 2020 — forked from maksverver/PKGBUILD
golly-4.0 PKGBUILD
View PKGBUILD
# Maintainer: Kyle Sferrazza <kyle.sferrazza@gmail.com>
# Contributor: Maks Verver <maksverver@geocities.com>
# Contributor: p2k <Patrick.Schneider@uni-ulm.de>
# Contributor: nokangaroo <nokangaroo@aon.at>
pkgname=golly
pkgver=4.0
pkgrel=1
pkgdesc="A simulator for Conway's Game of Life and other cellular automata"
@AlephAlpha
AlephAlpha / _tealdeer
Last active Jul 22, 2019
zsh autocompletion for tealdeer, a tldr implementation in Rust (https://github.com/dbrgn/tealdeer )
View _tealdeer
#compdef tldr
_arguments : \
{-h,--help}'[Print the help message]' \
{-v,--version}'[Show version information]' \
{-l,--list}'[List all commands in the cache]' \
{-f,--render}'[Render a specific markdown file]:file:_files' \
{-o,--os}'[Override the operating system]:type:(linux osx sunos windows other)' \
{-u,--update}'[Update the local cache]' \
{-c,--clear-cache}'[Clear the local cache]' \
@AlephAlpha
AlephAlpha / z3_life_search.py
Last active Mar 30, 2021
试玩 Z3……速度好慢,搜个 25P3H1V0.1 都要十几秒。懒得支持生命游戏以外的规则以及对称性了。
View z3_life_search.py
#!/usr/bin/env python
from z3 import *
import sys
class LifeSearch:
nbhd = {(i, j): 1 if i == j == 0 else 2
for i in range(-1,2)
for j in range(-1,2)}
@AlephAlpha
AlephAlpha / luna_pinyin.cthulhu.dict.yaml
Created Aug 10, 2018
Rime 克苏鲁神话词库,手动整理,欢迎补充。
View luna_pinyin.cthulhu.dict.yaml
# Rime custom dictionary
# encoding: utf-8
#
# Rime 克苏鲁神话词库
# 手动整理,欢迎补充
#
# 参考资料:
# * Frend《邪神与那些创造邪神的人》
# https://www.zhihu.com/people/frend-10/posts
# * 艾守义《克苏鲁神话:萌萌哒古神在哪里》
@AlephAlpha
AlephAlpha / StillLife.m
Last active Jul 18, 2018
Game of Life still life searcher in Mathematica
View StillLife.m
SearchStillLife[w_, h_] :=
Block[{r = RandomInteger[1, {w, h}]},
ArrayPlot[
Echo[Mod[r + ArrayReshape[Boole@#, {w, h}], 2], "RLE: ",
"x = " <> #2 <> ", y = " <> #1 <> ", rule = B3/S23\n" & @@
ToString /@ Dimensions@# <>
StringRiffle[
StringCases[
StringReplace[
StringReplace[
@AlephAlpha
AlephAlpha / TUNet.wl
Last active Apr 15, 2018
用Mathematica写了个TUNet登录脚本
View TUNet.wl
#!/usr/bin/env wolframscript
(*_*)
(*命令行参数有两个以上时,前两个分别为用户名和密码*)
(*命令行参数只有一个时,退出登录*)
(*没有命令行参数,显示登录状态*)
@AlephAlpha
AlephAlpha / webcomics.wl
Last active Jun 5, 2019
转发网漫的Mathematica脚本(已放到 GitHub:https://github.com/AlephAlpha/WebComics ,此处不再更新)
View webcomics.wl
#!/usr/bin/env wolframscript
appURL = " https://github.com/AlephAlpha/WebComics";
weiboAPI = "https://api.weibo.com/2/statuses/share.json";
(* 请设成脚本所在的目录 *)
(* 目录名有中文时必须先转 UTF8 *)
SetDirectory[
FromCharacterCode[
ToCharacterCode@"/home/alephalpha/文档/马甲与小号/WebComics/", "UTF8"]];
@AlephAlpha
AlephAlpha / jcuken.schema.yaml
Created Aug 11, 2016
Rime 俄语 ЙЦУКЕН 键盘布局
View jcuken.schema.yaml
# Rime schema
# vim: set sw=2 sts=2 et:
# encoding: utf-8
schema:
schema_id: jcuken
name: ЙЦУКЕН
version: "1.0"
author:
- AlephAlpha <alephalpha911@gmail.com>
@AlephAlpha
AlephAlpha / 10moliyf.md
Last active Jul 17, 2018
10 Mathematica One Liners to Impress Your Friends
View 10moliyf.md
@AlephAlpha
AlephAlpha / palladius.schema.yaml
Last active Mar 6, 2016
Rime 西里尔拼音输入方案
View palladius.schema.yaml
# Rime schema
# vim: set sw=2 sts=2 et:
# encoding: utf-8
schema:
schema_id: palladius
name: "西里尔拼音"
version: "0.0"
author:
- AlephAlpha <alephalpha911@gmail.com>