Skip to content

Instantly share code, notes, and snippets.

View jerlich's full-sized avatar

Jeffrey Erlich jerlich

View GitHub Profile
@jkrumbiegel
jkrumbiegel / makie_slideshow.jl
Created January 27, 2024 17:50
Makie slide show
using GLMakie
slides = [
(gl) -> begin
for i in 1:2, j in 1:2
lines(gl[i, j], cumsum(randn(1000)))
end
return (; title = "A slide with two Axis")
end,
(gl) -> begin
using CairoMakie
using Cairo
using Poppler_jll
@recipe(PDF) do scene
Attributes(
bbox = BBox(0, 100, 0, 100)
)
end
@Samyak2
Samyak2 / oh-my-zsh-bira-conda-venv.md
Last active November 18, 2023 23:03
Adding virtualenv and conda support to Oh My Zsh Bira theme
@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active July 12, 2024 22:28
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR

@delivrance
delivrance / ainput.py
Last active June 13, 2024 09:18
Python async input
import asyncio
from concurrent.futures import ThreadPoolExecutor
async def ainput(prompt: str = "") -> str:
with ThreadPoolExecutor(1, "AsyncInput") as executor:
return await asyncio.get_event_loop().run_in_executor(executor, input, prompt)
async def main():
@ankitsejwal
ankitsejwal / save-github-credentials.md
Last active July 1, 2024 11:38
How to save username and password in git

Save credentials:

$ git config credential.helper store
$ git pull

#provide user-name and password and those details will be remembered later. The credentials are stored in the disk, with the disk permissions.

if you want to change password later:

$ git config credential.helper store 
@calligross
calligross / app.R
Last active August 23, 2023 17:22
Shiny Cookie Based Authentication Example, please visit https://calligross.de/post/using-cookie-based-authentication-with-shiny/ for more information.
library(shiny)
library(shinyjs)
if (!dir.exists('www/')) {
dir.create('www')
}
download.file(
url = 'https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js',
destfile = 'www/js.cookie.js'
@aureliennicosia
aureliennicosia / global.R
Created August 13, 2016 21:55
Angular Regression
list.of.packages <- c("ggplot2", "circular", "gridExtra", "grid",
"latex2exp", "shinydashboard", "shiny", "knitr")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,
"Package"])]
if (length(new.packages)) install.packages(new.packages)
library(knitr)
library("shiny")
@MikeInnes
MikeInnes / startup.jl
Last active February 5, 2023 12:54
Some useful macros for Julia
# Repeat an operation n times, e.g.
# @dotimes 100 println("hi")
macro dotimes(n, body)
quote
for i = 1:$(esc(n))
$(esc(body))
end
end
end