Skip to content

Instantly share code, notes, and snippets.

@nodegin
nodegin / .zshrc
Last active February 16, 2023 10:15
2023 zshrc for work on mac
# brew install lolcat
# brew install thefuck
# brew install neofetch
# pnpm i -g git-cz
ZSH_THEME="lambda"
# install brew for both x64 and arm64:
# https://medium.com/mkdir-awesome/how-to-install-x86-64-homebrew-packages-on-apple-m1-macbook-54ba295230f
@nodegin
nodegin / index.js
Last active May 12, 2020 11:45
list of collected cjk itaiji variant characters
module.exports = {
// '下': ['丅'],
// '上': ['丄'],
// '草': ['艸'],
// '初': ['䥚'],
// '義': ['羛'],
// '軟': ['輭'],
// '仁': ['忎'],
// '天': ['兲'],
// '曜': ['𫞂'],
@nodegin
nodegin / build.sh
Created March 26, 2019 21:19
Run this inside a Docket container to build TDLib static library
#
# This file provide basic guide for building TDLib binary on CentOS 7.5.
#
# Procedure can be done easily inside a Docker container:
# docker run -it -v /tmp:/tmp centos:7.5.1804 bash
#
yum -y update
yum -y install git perl make which gperf readline-devel zlib-devel
@nodegin
nodegin / build.sh
Created March 26, 2019 21:19
Run this inside a Docket container to build TDLib static library
#
# This file provide basic guide for building TDLib binary on CentOS 7.5.
#
# Procedure can be done easily inside a Docker container:
# docker run -it -v /tmp:/tmp centos:7.5.1804 bash
#
yum -y update
yum -y install git perl make which gperf readline-devel zlib-devel
<div>
<img alt src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAQAAAD/5HvMAAAACXBIWXMAAAsTAAALEwEAmpwYAAADGGlDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjaY2BgnuDo4uTKJMDAUFBUUuQe5BgZERmlwH6egY2BmYGBgYGBITG5uMAxIMCHgYGBIS8/L5UBFTAyMHy7xsDIwMDAcFnX0cXJlYE0wJpcUFTCwMBwgIGBwSgltTiZgYHhCwMDQ3p5SUEJAwNjDAMDg0hSdkEJAwNjAQMDg0h2SJAzAwNjCwMDE09JakUJAwMDg3N+QWVRZnpGiYKhpaWlgmNKflKqQnBlcUlqbrGCZ15yflFBflFiSWoKAwMD1A4GBgYGXpf8EgX3xMw8BSMDVQYqg4jIKAUICxE+CDEESC4tKoMHJQODAIMCgwGDA0MAQyJDPcMChqMMbxjFGV0YSxlXMN5jEmMKYprAdIFZmDmSeSHzGxZLlg6WW6x6rK2s99gs2aaxfWMPZ9/NocTRxfGFM5HzApcj1xZuTe4FPFI8U3mFeCfxCfNN45fhXyygI7BD0FXwilCq0A/hXhEVkb2i4aJfxCaJG4lfkaiQlJM8JpUvLS19QqZMVl32llyfvIv8H4WtioVKekpvldeqFKiaqP5UO6jepRGqqaT5QeuA9iSdVF0rPUG9V/pHDBYY1hrFGNuayJsym740u2C+02KJ5QSrOutcmzjbQDtXe2sHY0cdJzVnJRcFV3k3BXdlD3VPXS8Tbxsfd99gvwT//ID6wIlBS4N3hVwMfRnOFCEXaRUVEV0RMzN2T9yDBLZE3aSw5IaUNak30zkyLDIzs+ZmX8xlz7PPryjYVPiuWLskq3RV2ZsK/cqSql01jLVedVPrHzbqNdU0n22VaytsP9op3VXUfbpXta+x/+5Em0mzJ/+dGj/t8AyNmf2zvs9JmHt6vvmCpYtEFrcu+bYsc/m9lSGrTq9x
yum -y install bitmap-fonts bitmap-fonts-cjk mkfontscale fontconfig
mkdir /usr/share/fonts/win/
mv msjh.ttf /usr/share/fonts/win
cd /usr/share/fonts/win/
mkfontscale
mkfontdir
fc-cache
@nodegin
nodegin / \Library\LaunchDaemons\com.pf.plist
Last active May 16, 2017 05:27
redirect 80 to 8080 on macOS
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE plist PUBLIC "-//Apple Computer/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.pf.plist</string>
<key>Program</key>
<string>/sbin/pfctl</string>
<key>ProgramArguments</key>
<array>
@nodegin
nodegin / default
Created September 14, 2016 19:52
Nginx + phpMyAdmin + Node.js
server {
listen 8080 default_server;
listen [::]:8080 default_server ipv6only=on;
root /home/ubuntu;
index index.php index.html index.htm;
server_name localhost;
location / {
@nodegin
nodegin / gist:c8971099277ebfb77f61c2a3e13a0c83
Last active April 27, 2016 13:09 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@nodegin
nodegin / raphael.export.min.js
Created April 20, 2016 01:19
Raphael export minified
(function(h){function p(a){if("number"===typeof a)return a.toString();var f={"<":"lt",">":"gt",'"':"quot","'":"apos"},c;for(c in f)a=a.replace(new RegExp(c,"g"),"&"+f[c]+";");return a}function t(a,f){var c=[],b;if("undefined"!=typeof a.unshift){var k=a.length;for(b=0;b<k;b++)if("undefined"!=typeof a[b]){var e=f.call(this,a[b],b);null!==e&&c.push(e)}}else for(b in a)a.hasOwnProperty(b)&&(e=f.call(this,a[b],b),null!==e&&c.push(e));return c}function u(a,f,c){for(var b in a)a.hasOwnProperty(b)&&(c=f.call(this,
c,a[b],b));return c}function r(a,f,c,b){if("undefined"===typeof b||null===b)b="";"object"===typeof f&&(f=t(f,function(a,b){switch(b){case "transform":return;case "fill":if(a.match(/^hsb/)){var c=a.replace(/^hsb\(|\)$/g,"").split(",");3===c.length&&(a=h.hsb2rgb(c[0],c[1],c[2]).toString())}}return b+'="'+p(a)+'"'}).join(" "));return"<"+a+(c?' transform="matrix('+c.toString().replace(/^matrix\(|\)$/g,"")+')" ':" ")+f+">"+b+"</"+a+">"}function w(a){return{font:{family:"undefined"===typeof a.attrs.font?
null:a.a