Skip to content

Instantly share code, notes, and snippets.

View gwerbin's full-sized avatar
💭
I might be slow to respond.

Greg Werbin gwerbin

💭
I might be slow to respond.
View GitHub Profile
@TheDcoder
TheDcoder / UNLICENSE
Last active July 6, 2019 14:07
strseg - Get delimiter-separated segments from a string in a non-destructive method
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@nooges
nooges / VIA Porting Info.md
Last active November 17, 2022 15:57
Info on adding VIA Configurator support to a board using QMK

Making a board compatible with VIA Configurator

💥NOTE💥: Don't do this yet, all of this stuff is still 🚑💣BLEEDING EDGE💣🚑, and you will 🔪cut yourself🔪 badly if you choose to do it. Please wait for 🗿Wilba's QMK code to be refactored prior to pushing anything to QMK, as we don't want to end up with a bunch of different forks of the code.

So you've seen VIA Configurator in action, and you want to get this magic supported for your board?

There's two main steps:

  1. Add dynamic keymap support to keyboard in QMK
  2. Add layout to VIA
@alexer
alexer / sbstd.py
Last active October 29, 2018 16:01
"Should Be in the STDlib" - aka. my helper library, which has outgrown it's original name
# Really useful in some situations, but you can see how often it's actually been used, since cmp() doesn't even exist anymore...
sign = lambda v: cmp(v, 0)
clamp = lambda v, minv, maxv: min(max(v, minv), maxv)
# These are a bit of a misnomers, since below/above suggests lt/gt, while these are le/ge
clamp_below = lambda v, maxv: min(v, maxv)
clamp_above = lambda v, minv: max(v, minv)
div_ceil = lambda dividend, divisor: (dividend - 1) // divisor + 1
# Just for symmetry
@GantMan
GantMan / NEW_OPENSOURCE_TODO.md
Last active December 27, 2021 23:20
ALL the things to do when starting a new Github Project - IR JavaScript | TypeScript

Step 1 - Create nest on Github

  1. Click Plus
  2. New Repository
  3. IR/REPO_NAME
  4. PROJECT_DESCRIPTION
  5. Do not initialize with anything (easier to add after)
  6. Star your repo
  7. Pull your repo down locally and cd to it
@X4
X4 / sklearn-pipeline.py
Last active October 30, 2017 00:28
Building a SciKit-Learn Pipeline
# Make ML-Pipeline Runs Reproducible
random_state=7
# Testing our Pipeline with an ML-Ready Dataset
from sklearn.datasets import load_iris
iris = load_iris()
# Assign ML-Input and Ml-Target
Xi = iris.data # Input
yi = iris.target # Output
@romainl
romainl / redir.md
Last active March 22, 2024 17:09
Redirect the output of a Vim or external command into a scratch buffer

Redirect the output of a Vim or external command into a scratch buffer

Usage (any shell)

Show full output of command :hi in scratch window:

:Redir hi

Show full output of command :!ls -al in scratch window:

@fcard
fcard / vimscript_parser.vim
Created March 28, 2017 23:01
Vimscript parser in vimscript. Sure why not
" Command: Command
"
" A different take on command creation,
" Command creates a namespace for which
" its implementation functions can be
" stored in. The command name also comes
" first, followed by its argument type
" in parentheses, to mimic function
" definitions. name Anything preceding a ':='
" command body.
file = open("usb_hid_keys.h", "r")
for line in file:
goodline = line[8:].split(" ")
if line.startswith("#define ") and len(goodline)>1:
key = goodline[0]
value = ""
for i in range(1, len(goodline)):
if goodline[i] == "":
continue
@pradyunsg
pradyunsg / proposal.md
Last active February 7, 2020 19:56
@pradyunsg's GSoC 2017 proposal

Adding Proper Dependency Resolution to pip

  • Name: Pradyun S. Gedam
  • Email: [pradyunsg@gmail.com][mailto-email]
  • Github: [pradyunsg][github-profile]
  • University: [VIT University, Vellore, India][vit-homepage]
  • Course: Bachelor of Technology in Computer Science and Engineering
  • Course Term: 2016/17 - 2019/20 (4 Year)
  • Timezone: IST (GMT +5:30)
  • GSoC Blog RSS Feed URL:

Using O2D to Program Duck PCBs

Special Thanks to KacKLaPPen23 and iNViSiBiLiTi for making this guide possible and being generally excellent people!

Programming Duck PCBs with O2D is a notoriously shitty experience.

Luckily with O2D 1.10 and this guide it will be less shitty!

Prerequisites