Skip to content

Instantly share code, notes, and snippets.

Avatar

Vee Satayamas veer66

View GitHub Profile
View feeder.opml
<?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"/>
View .emacs
(savehist-mode 1)
(require 'package)
(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
("nongnu" . "https://elpa.nongnu.org/nongnu/")
("melpa" . "https://melpa.org/packages/")))
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
(add-hook 'after-init-hook 'global-company-mode)
View .emacs
(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 Jul 11, 2022
บางทีเวลาติดตั้ง font แล้วภาษาไทยไม่ได้อย่างใจ มันต้องไปแก้พวก alias อีกหน่อย แล้วเอาไปใส่ $HOME/.config/fontconfig/fonts.conf #MXLinux
View fonts.conf
<?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>
View install-emacs-28.1.bash
#!/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 Mar 23, 2022
Use Ruby's ractor to run Apertium tools
View l_tag.rb
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
View kinship_example.pl
male(tom).
male(bob).
male(jim).
female(liz).
female(pat).
female(ann).
female(pam).
parent(pam,bob).
parent(tom,bob).
parent(tom,liz).
View elfeed.el
(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"))
View xtz_alert.py
import time
from pygame import mixer
from pygame.mixer import music
import socket
import ssl
import uuid
import json
MIN_XTZ = 4.7
View nlpo3-cli-benchmark.md

Benchmark

nlpo3-cli vs newmm

Setup

  • Computer: Scaleway's Mac mini M1
  • Rustc: rustc 1.54.0 (a178d0322 2021-07-26)
  • Python: Python 3.8.2
  • OS: Darwin 506124d8-4acf-4595-9d46-8ca4b44b8110 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:27 PDT 2021; root:xnu-7195.141.2~5/RELEASE_ARM64_T8101 arm64