Skip to content

Instantly share code, notes, and snippets.

View calebschoepp's full-sized avatar
Bit Barista

Caleb Schoepp calebschoepp

Bit Barista
View GitHub Profile
@april
april / arena-macos-full-screen-fixes.sh
Last active January 15, 2026 21:02
Fixes Magic Arena's broken full screen implementation on macOS
#!/bin/bash
# this forces Arena into full screen mode on startup, set back to 3 to reset
# note that if you go into the Arena "Graphics" preference panel, it will reset all of these
# and you will need to run these commands again
defaults write com.wizards.mtga "Screenmanager Fullscreen mode" -integer 0
defaults write com.wizards.mtga "Screenmanager Resolution Use Native" -integer 0
# you can also replace the long complicated integer bit with any other scaled 16:9
# resolution your system supports.
@sytone
sytone / .gitconfig
Last active January 10, 2024 16:57
Aliases I have in my global git config
[alias]
# Pull with prune
pp = pull --prune --autostash
# Standard checkout
co = checkout
# Edit the global configuration
ec = config --global -e
@georgexsh
georgexsh / goto.py
Created September 18, 2017 07:47
python goto with system trace function
import sys
def j(lineno):
frame = sys._getframe().f_back
called_from = frame
def hook(frame, event, arg):
if event == 'line' and frame == called_from:
try:
frame.f_lineno = lineno
@robksawyer
robksawyer / marketo_example.html
Last active October 30, 2020 00:36
Solution to using UTM parameters & cookies to capture lead source information. See https://nation.marketo.com/thread/24866
<script type="text/javascript">
// getQueryParams
//This grabs the UTM parameters from the URL
function getQueryParams(qs) {
qs = qs.split("+").join(" ");
var params = {}, tokens,
re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]);
}
@lfittl
lfittl / docker-compose.yml
Last active December 20, 2024 14:57
Enabling pg_stat_statements in a Docker container
version: '2'
services:
db:
image: postgres:16
ports:
- "5432:5432"
command: >
postgres
-c shared_preload_libraries='pg_stat_statements'
@alexpchin
alexpchin / Rails_Generating_and_Scaffolding.md
Last active July 29, 2025 13:16
Rails Generating & Scaffolding

Rails Generating & Scaffolding

Rails' use of strict naming conventions means a lot of core code SHOULD be in the same format whoever writes it? It could be written by a friend, colleague or a computer... it shouldn't matter because the same Rails rules apply to everyone.

This means that Rails can actually do some tasks for you! It can actually build things and write code on your behalf...

Coming from another language like PHP, this can seem like magic.