Skip to content

Instantly share code, notes, and snippets.

View josemariagarcia95's full-sized avatar

José María josemariagarcia95

View GitHub Profile
@slow-is-fast
slow-is-fast / python list usb
Created August 3, 2016 13:38
python list connected usb device
import usb.core
dev = usb.core.find(find_all=1)
for cfg in dev:
print cfg.product
print ('Decimal VendorID=' + str(hex(cfg.idVendor)) + ' & ProductID=' + str(cfg.idProduct) + '\n')
print ('Hexadecimal VendorID=' + hex(cfg.idVendor) + ' & ProductID=' + hex(cfg.idProduct) + '\n\n')
@wzup
wzup / .jsbeautifyrc
Last active March 30, 2023 13:40
.jsbeautifyrc file example
{
// The plugin looks for a .jsbeautifyrc file in the same directory as the
// source file you're prettifying (or any directory above if it doesn't exist,
// or in your home folder if everything else fails) and uses those options
// along the default ones.
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options
// Documentation: https://github.com/einars/js-beautify/
"html": {
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg", "dust"],
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream