Skip to content

Instantly share code, notes, and snippets.

View humanfactors's full-sized avatar
🏳️‍⚧️

Micah K. Wilson humanfactors

🏳️‍⚧️
View GitHub Profile
@anonymous1184
anonymous1184 / example.ahk
Last active March 14, 2024 06:10
YouTube Download Helper

;
; REQUIRED
;
ytdl.Path := "D:\CLI\youtube"
; Path of yt-dlp.exe
;
@cdriveraus
cdriveraus / bivarate.R
Created May 14, 2021 08:34
Simple bivariate ctsem
# The current manual is here:
# https://cran.r-project.org/web/packages/ctsem/vignettes/hierarchicalmanual.pdf
# A few blog posts with examples are here: https://cdriver.netlify.app/
# Here's a bivariate panel example script:
library(ctsem)
data(AnomAuth)
longdat <- ctDeintervalise(ctWideToLong(AnomAuth,Tpoints = 5,n.manifest = 2))
@TfTHacker
TfTHacker / Hypothesidian.js
Last active May 5, 2024 00:58
Hypothes.is - retrieve your annotations into Obsidian (for templater plugin)
<%*
/*
# Hypothes.idian a templater script for retrieving annotations from Hypothes.is
Dev: TfTHacker https://twitter.com/TfTHacker
# Prerequisites:
+ Templater plugin by https://github.com/SilentVoid13/Templater
+ Free Hypothes.is developer token from: https://hypothes.is/account/developer
+ This script will prompt you for his token and save it to a file called "hypothesis config.md"
+ This file store your configuration and can be located any where in your vault.
#' Restart RStudio
#'
#' @id 6
#' @interactive
usethis:::restart_rstudio
#' Go to Source File Location
#'
#' @description Navigate to current source file in Files pane
#' @id 1
@brooke-watson
brooke-watson / cursed_starwars_data.R
Last active December 10, 2019 19:51
cursed_data_challenge
# ---------------------------------------
# untidy data
# ---------------------------------------
# this dataset is a sample of the kind of data that might appear in the wild,
# particularly when dealing with government data,
# particularly when trying to convert an output table or individual report
# back into a raw data format that can be analyzed.
# in these test datasets, discrete observations are spread out across multiple rows.
@atruskie
atruskie / terminal-keybind.ahk
Last active December 30, 2022 15:44
AutoHotkey script to bind Win+~ keyboard shortcut to Windows Terminal
#NoEnv
#SingleInstance force
SendMode Input
DetectHiddenWindows, on
SetWinDelay, 0
#`::
terminal := WinExist("ahk_exe WindowsTerminal.exe")
if (terminal)
{
@pvik
pvik / smartparens-cheatsheet.md
Last active March 17, 2024 03:29
A Cheatsheet for Emacs Smarparens example configuration

An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.

Traversal

C-M-f sp-forward-sexp
C-M-b sp-backward-sexp
@rossant
rossant / latex_to_image.py
Created February 12, 2018 13:46
Convert a LaTeX equation into EPS and PNG with Python
import os
import os.path as op
from pathlib import Path
import shutil
import subprocess
import tempfile
from IPython.lib.latextools import genelatex
@gavinhungry
gavinhungry / thinkpad-input.sh
Last active June 8, 2022 23:16
ThinkPad input settings
synclient VertScrollDelta=-60 HorizScrollDelta=-60
synclient PalmDetect=1 PalmMinZ=100 PalmMinWidth=7
synclient RightButtonAreaTop=0 RightButtonAreaLeft=0
synclient CoastingFriction=75
xinput set-prop "$TOUCHPAD" 'Device Accel Profile' 2
xinput set-prop "$TOUCHPAD" 'Device Accel Constant Deceleration' 25
xinput set-prop "$TOUCHPAD" 'Device Accel Velocity Scaling' 10000
xinput set-prop "$TRACKPOINT" 'libinput Natural Scrolling Enabled' 1
@cdriveraus
cdriveraus / mediation.R
Created October 26, 2017 14:40
Simple mediation example in ctsem - frequentist and hierarchical Bayes approaches.
install.packages('ctsem')
library(ctsem)
#generate data (columns of drift matrix 'cause' rows)
genmodel <- ctModel(n.manifest=3,n.latent=3,LAMBDA=diag(3),Tpoints=10,
DRIFT=matrix(c(
-.3, .1,0,
0,-.3,.1,
0,0,-.3), nrow=3, ncol=3),
DIFFUSION=diag(1,3))