Skip to content

Instantly share code, notes, and snippets.

View foldfelis's full-sized avatar
🤪

JingYu Ning foldfelis

🤪
  • NTHU
  • Taiwan
View GitHub Profile
# cowsay "I use Windows, BTW"
oh-my-posh.exe --init --shell pwsh --config ${env:PROGRAMFILES(x86)}\oh-my-posh\themes\ys.omp.json | Invoke-Expression
function JL([String]$ScriptName) {
julia.exe -t 8 -i --proj "$ScriptName"
}
function Pluto() {
julia.exe -t 8 -e "using Pluto; Pluto.run()"
@foldfelis
foldfelis / raw.py
Created February 7, 2022 15:18
Raw mode in python
import sys
import tty
import termios
def raw():
# save old setting
file_desc = sys.stdin.fileno()
old_setting = termios.tcgetattr(file_desc)
# enable raw mode
using Plots
#########
# utils #
#########
struct FontArgv
size::Int64
color::Symbol
end
@foldfelis
foldfelis / ReadInStream.jl
Last active July 21, 2020 09:16
Read keyboard key.
using REPL
# +-------+
# | Utils |
# +-------+
read_next_byte(io::IO) = read(io, 1)[1]
function read_stream_bytes(stream::IO)
queue = UInt8[]