Skip to content

Instantly share code, notes, and snippets.

View ethanhs's full-sized avatar

Ethan Smith ethanhs

View GitHub Profile
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active June 14, 2024 08:32
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Generation of JLCPCB PCBA compatible BOM
mariobadr / game_loop.cpp
Last active May 23, 2024 02:36
A basic game loop using std::chrono
* The MIT License (MIT)
* Copyright (c) 2016 Mario Badr
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
technoweenie /
Created May 30, 2010 18:34
GitHub OAuth Busy Developer's Guide

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access:
tito /
Created November 12, 2013 15:28
Bluetooth example on Android using Python / Pyjnius
Bluetooth/Pyjnius example
This was used to send some bytes to an arduino via bluetooth.
The app must have BLUETOOTH and BLUETOOTH_ADMIN permissions (well, i didn't
tested without BLUETOOTH_ADMIN, maybe it works.)
Connect your device to your phone, via the bluetooth menu. After the
pairing is done, you'll be able to use it in the app.
Brainiarc7 /
Last active May 5, 2023 01:51
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

pib /
Created November 23, 2009 07:57
A simple Python s-expression parser.
from string import whitespace
atom_end = set('()"\'') | set(whitespace)
def parse(sexp):
stack, i, length = [[]], 0, len(sexp)
while i < length:
c = sexp[i]
print c, stack
stenstorp /
Last active December 8, 2022 06:37 — forked from MichaelLawton/gist:ee27bf4a0f591bed19ac
Installing Maya 2016 SP6 on Ubuntu 16.04 with Student License
#Download Maya from here:
#Get a student License from:
#Log in and select maya 2016, your language and an OS. Either should work.
# !!!!!! IMPORTANT !!!!!!
# !!!!!! IMPORTANT !!!!!!
tito /
Last active October 10, 2020 05:59
Python-for-android / Pyjnius - test live-creation of native android widget.
Use with Kivy Remote Shell:
cat | ssh -p8000 -t -t admin@192.168.x.x
from jnius import autoclass, cast
from android.runnable import Runnable
activity = autoclass('').mActivity
"""Example usage:
In [1]: !cat ayy.s
.global _start
.type _start, @function
movq $10, %rdx
pushw $10
ethanhs / stubbed_clean.txt
Last active May 24, 2017 02:18
This is the output of following imports in the zulip sources with ignored files removed
# stub issues
zerver/migrations/ error: Module has no attribute "validators"
zerver/migrations/ error: Module has no attribute "validators"
zerver/migrations/ error: Module has no attribute "validators"
zerver/migrations/ error: Module has no attribute "contrib"
zerver/tornado/ error: Module 'django.core' has no attribute 'signals'
zerver/views/ error: Module 'django.core' has no attribute 'signing'
zerver/ error: Module has no attribute "contrib"
zproject/ error: Module has no attribute "contrib"
zerver/migrations/ error: Module has no attribute "validators"