Skip to content

Instantly share code, notes, and snippets.

View veer66's full-sized avatar

Vee Satayamas veer66

View GitHub Profile
@veer66
veer66 / .emacs
Last active September 9, 2022 15:29
(require 'package)
(setq package-archives '(("elpa" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
<!DOCTYPE html>
<html>
<body>
<audio controls="false" id="player"></audio>
<div id="playlist"></div>
<script>
var mp3_idx = 0;
var mp3_urls = ["http://download.watnapahpong.org/mp3/audio_book/20-สังโยชน์/001-ที่ตั้งแห่งสัญโญชน์ และสัญโญชน์.mp3",
"http://download.watnapahpong.org/mp3/audio_book/20-สังโยชน์/002-ที่ตั้งแห่งอุปาทาน และอุปาท.mp3",
"http://download.watnapahpong.org/mp3/audio_book/20-สังโยชน์/003-ความเพลิน คือ อุปาทาน.mp3",
@veer66
veer66 / feeder.opml
Last active August 9, 2022 07:31
feeds
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
<head>
<title>
Feeder
</title>
</head>
<body>
<outline title="Clojure" text="Clojure">
<outline title="Inside Clojure" text="Inside Clojure" type="rss" xmlUrl="http://insideclojure.org/feed.xml"/>
(require 'package)
(setq package-archives '(("elpa" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
@veer66
veer66 / fonts.conf
Created July 11, 2022 04:25
บางทีเวลาติดตั้ง font แล้วภาษาไทยไม่ได้อย่างใจ มันต้องไปแก้พวก alias อีกหน่อย แล้วเอาไปใส่ $HOME/.config/fontconfig/fonts.conf #MXLinux
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match>
<test compare="contains" name="lang">
<string>th</string>
</test>
<edit mode="prepend" name="family">
<string>Noto Sans Thai</string>
</edit>
#!/bin/bash
export PKG_CONFIG_PATH=$HOME/lib64/pkgconfig:$HOME/lib/pkgconfig
export LD_RUN_PATH=$HOME/lib:$HOME/lib64
export LD_LIBRARY_PATH=$HOME/lib:$HOME/lib64
export LDFLAGS="-L$HOME/lib -L$HOME/lib64"
rm -rf libunistring-1.0 libidn2-2.3.2 nettle-3.6 gmp-6.2.1 emacs-28.1
curl https://ftp.gnu.org/gnu/libunistring/libunistring-1.0.tar.gz | tar -xzvf - && \
@veer66
veer66 / l_tag.rb
Created March 23, 2022 14:20
Use Ruby's ractor to run Apertium tools
NUMBER_OF_WORKERS = 8
def tag(sent, line_no)
tag_str = nil
IO.popen("lt-proc ../data/eng-tha.automorf.bin | cg-proc -n -1 ../data/eng-tha.rlx.bin", "r+") do |f|
f.write sent
f.close_write
tag_str = f.gets
end
return tag_str
male(tom).
male(bob).
male(jim).
female(liz).
female(pat).
female(ann).
female(pam).
parent(pam,bob).
parent(tom,bob).
parent(tom,liz).
(setq elfeed-feeds
'("http://feeds.feedburner.com/bact"
"https://kitty.in.th/index.php/feed/"
"https://www.unzeen.com/feed/"
"https://dev.to/feed/mrchoke"
"https://dev.to/feed/iporsut"
"http://thep.blogspot.com/feeds/posts/default"
"https://naiwaen.debuggingsoft.com/feed/"
"https://www.blognone.com/taxonomy/term/10564/feed"
"https://www.blognone.com/taxonomy/term/5345/feed"))
;; How to run
;; sbcl --load download-peertube-videos.lisp
(ql:quickload :jonathan)
(ql:quickload :dexador)
(ql:quickload :alexandria)
(ql:quickload :asdf)
(import 'alexandria:assoc-value)