Skip to content

Instantly share code, notes, and snippets.

@oheil
oheil / avoidGlobals.jl
Last active December 25, 2023 14:37
Implementing global state without globals
using BenchmarkTools
N=100_000
# With a let block:
let state = Ref{Bool}(false)
global setLastShowHidden, getLastShowHidden
function setLastShowHidden(b::Bool)
state[] = b
end
@oheil
oheil / vim-config-vimrc.md
Last active August 25, 2023 12:22
vim Konfiguration:

~/.vimrc

" :set mouse=r
:set mouse-=a

" syntax off
syntax on

:color elflord
@oheil
oheil / julia-pkg-develop-pattern
Last active June 30, 2021 12:14
julia development package pkg howto
#create a new package
using PkgTemplates
tpl=Template(;user="oheil")
tpl("MyNewPackageName")
# new version of registered package
https://github.com/JuliaRegistries/Registrator.jl#via-the-github-app
# create and use environment
julia> cd(raw"..\..\..\.julia\environments")
@oheil
oheil / git_cheat_sheet.md
Last active September 8, 2023 10:52
git cheat sheet