Skip to content

Instantly share code, notes, and snippets.

View sloretz's full-sized avatar
⚠️
404 status not found

Shane Loretz sloretz

⚠️
404 status not found
  • Intrinsic
  • Mountain View, CA
View GitHub Profile
@tcoppex
tcoppex / c_nostd.txt
Last active May 29, 2025 14:11
Writing C software without the standard library [Linux Edition] - Franc[e]sco's Gopherspace
###################################################################
Writing C software without the standard library
Linux Edition
###################################################################
There are many tutorials on the web that explain how to build a
simple hello world in C without the libc on AMD64, but most of them
stop there.
I will provide a more complete explanation that will allow you to
build yourself a little framework to write more complex programs.
@witmin
witmin / ffmpeg-mp4-to-animated-webp.md
Last active June 5, 2025 06:36
Convert MP4 file to animated WebP in ffmpeg

Convert MP4 file to animated WEBP file in ffmpeg CLI

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

brew install ffmpeg

Validate the installation:

@ctaylo21
ctaylo21 / init.vim
Last active May 5, 2022 10:02
Neovim example of using winhighlight to dim inactive windows
" Background colors for active vs inactive windows
hi ActiveWindow guibg=#17252c
hi InactiveWindow guibg=#0D1B22
" Call method on window enter
augroup WindowManagement
autocmd!
autocmd WinEnter * call Handle_Win_Enter()
augroup END
@EricCousineau-TRI
EricCousineau-TRI / cpython_dbg_valgrind.sh
Last active August 3, 2021 20:51
Build a Debug+Valgrind version of Python 3.8.8, NumPy 1.18.2, and GDB 8.1.1
#!/bin/bash
set -euxo pipefail
install_prefix=~/.local/opt/cpython/3.8.8-dbg
jobs=4
# CPython
# https://stackoverflow.com/a/20126802/7829525
(
[ ! -d cpython ] && git clone https://github.com/python/cpython
@obahareth
obahareth / README.md
Created June 11, 2017 10:29
GitHub GraphQL API Starred Repositories With Pagination

GitHub GraphQL API Starred Repositories Examples With Pagination

You can play with the GraphQL API live here. It's pretty nice and has autocompletion based on the GraphQL schema.

The first example gets your first 3 starred repos, the cursor values can be used for pagination.

Here's an example response from the first query:

{
@ssbarnea
ssbarnea / wrapper.sh
Created April 18, 2012 06:23
Bash wrapper script that calls another exec and logs it’s execution output and return code
#!/bin/bash
# install:
# * rename the original script to script.original
# * rename the wrapper.sh to script
# * DONE! all calls are going to be logged now
TIMESTAMP=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
ME=`basename $0`
WRAPPED_COMMAND=$ME.original