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
@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