Skip to content

Instantly share code, notes, and snippets.

View memorycancel's full-sized avatar
🩷

Zhu Shung memorycancel

🩷
View GitHub Profile
@memorycancel
memorycancel / ruby.sublime-build
Created March 11, 2025 06:29
ruby.sublime-build
{
"cmd": ["/home/memorycancel/.local/share/mise/installs/ruby/3.4.2/bin/ruby", "\"$file\""],
"file_regex": "^[ ]*File \"(...)\", line ([0-9:]*)$",
"selector": "source.ruby",
"shell_cmd": "/home/memorycancel/.local/share/mise/installs/ruby/3.4.2/bin/ruby \"$file\"",
"shell": true
}
@memorycancel
memorycancel / install-ruby.sh
Created January 14, 2025 05:03 — forked from hopsoft/install-ruby.sh
Install ruby with rbenv and jemalloc on ubuntu
sudo apt-get update
sudo apt-get install libjemalloc-dev
RUBY_CONFIGURE_OPTS='--with-jemalloc' rbenv install 2.6.3
# test (look for jemalloc warnings)
MALLOC_CONF=invalid_flag:foo ruby -v
@memorycancel
memorycancel / gist:618efaa8235338e19b229e938b0c7b11
Last active March 10, 2025 05:00 — forked from linbaiwpi/gist:d2d55a376453ccb048d602bc67b59061
Google Pinyin Chinese Input Method Installation on Ubuntu
sudo apt-get -y install fcitx im-config
im-config ## choose fcitx
sudo apt-get -y install fcitx-googlepinyin
## choose fcitx keyboard icon, choose "Text Entry Setting"
## in the opned windows, click "+" icon
## search "pinyin" and Google Pinin" will come out
## if cannot not be used immediately, log out once
@memorycancel
memorycancel / ruby3.3-ubuntu24.txt
Last active October 21, 2024 09:37
ruby3.3-ubuntu24
# before https://mise.jdx.dev/lang/ruby.html
sudo apt-get install build-essential libz-dev libssl-dev libffi-dev libyaml-dev
mise use -g ruby@3.3
@memorycancel
memorycancel / hello_world.rb
Last active April 22, 2024 06:03
hello_world.rb
puts "Hello, World!"
#include <iostream>
int main()
{
std::cout<<"Hello, World!";
return 0;
}
@memorycancel
memorycancel / tcp_client.rs
Created April 7, 2022 07:47 — forked from postmodern/tcp_client.rs
TCP Client in Rust
#![allow(unused_variables)]
#![allow(unused_imports)]
use std::env;
use std::process;
use std::thread;
use std::io::{self, Read, Write, Error};
use std::net::TcpStream;
use std::net::TcpListener;