Skip to content

Instantly share code, notes, and snippets.

View ljcolling's full-sized avatar
💭
Currently going through my “I ❤️Rust” phase

Lincoln Colling ljcolling

💭
Currently going through my “I ❤️Rust” phase
View GitHub Profile
@hamelsmu
hamelsmu / example.ipynb
Last active December 24, 2020 10:01
run-time type checking with python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@xvzftube
xvzftube / init.vim
Last active January 4, 2025 08:42
my vimrc
" Plugins
call plug#begin('~/.vim/plugged')
Plug 'rakr/vim-one' " vim-one color theme
Plug 'scrooloose/nerdtree' " side bar file tree
Plug 'itchyny/lightline.vim' " minmal status bar
Plug 'tpope/vim-fugitive' " allows git commands in vim session
Plug 'airblade/vim-gitgutter' " shows git changes in gutter
Plug 'easymotion/vim-easymotion' " go to any word quickly '\\w', '\\e', '\\b'
Plug 'KKPMW/vim-sendtowindow' " send commands to REPL
Plug 'yuttie/comfortable-motion.vim' " scrolling 'C-d' or 'C-u'
# Assuming you have a matrix (CorMat_S) with a structure like a correlation matrix
# Load the libraries (NB probably some superfluous ones, I haven't double-checked)
pacman::p_load(
# General utility functions
tidyverse,
# Plotting
ggplot2,
scales,
ggstance,
@dskindell
dskindell / .skhdrc
Last active January 23, 2024 18:46
OSX yabai & skhd Configuration
####### Shortcut Hotkeys #############
# open terminal
lalt - return : $HOME/.config/skhd/open_terminal.sh --single-instance
lalt + shift - return : $HOME/.config/skhd/open_terminal.sh
#alt - t : osascript -e 'tell application "iTerm2" to create window with default profile'
# restart Yabi, SpaceBar, and SKHD
#lalt + lcmd - r : \
# launchctl kickstart -k "gui/${UID}/homebrew.mxcl.yabai"; \
# skhd --reload
# Install and load required packages
install.packages("needs")
library(needs)
needs(tidyverse, magrittr, animation, pdftools, png, scales)
# Function that extracts data from Google Mobility PDFs
process_google_mobility <- function(country_code, start_date, end_date){
# Convert first page of PDF into high-res PNG
pdf_convert(paste0("https://www.gstatic.com/covid19/mobility/",end_date,"_",country_code,"_Mobility_Report_en.pdf"), format = "png", pages = 1, dpi = 300, filenames = "IMG1.png")
read_csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_19-covid-Confirmed.csv") %>%
gather(date, cases, 5:ncol(.)) %>%
mutate(date = as.Date(date, "%m/%d/%y")) %>%
group_by(country = `Country/Region`, date) %>%
summarise(cases = sum(cases)) %>%
filter(country != "Others" & country != "Mainland China") %>%
bind_rows(
tibble(country = "Republic of Korea", date = as.Date("2020-03-11"), cases = 7755)
) %>%
group_by(country) %>%
@Mefistophell
Mefistophell / RUST.MD
Last active August 29, 2025 16:15
How to Compile a Rust Program on Mac for Windows

Question: I want to compile my Rust source code for the Windows platform but I use macOS.

Solution:

  1. Install target mingw-w64: brew install mingw-w64
  2. Add target to rustup: rustup target add x86_64-pc-windows-gnu
  3. Create .cargo/config
  4. Add the instructions below to .cargo/config
[target.x86_64-pc-windows-gnu]
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@pkazmier
pkazmier / .skhdrc
Last active January 19, 2025 02:23
# Modified from https://github.com/alyssais configuration.
#
# The following configuration heavily leverages modal keymaps to minimize the
# pollution of global keybindings. In addition, the modal keymaps facilitate
# the consistent use of the same keybindings across different modes. For
# example, this configuration uses 'h', 'l', 'j', and 'k' to represent west,
# east, south, and north when: changing focus, warping windows, resizing
# windows, swapping windows, and moving floating windows. Those four keys are
# mapped differently depending on the current mode to provide a consistent user
# experience.