Skip to content

Instantly share code, notes, and snippets.

🐱
Learning

Yoga Lin blueandhack

🐱
Learning
Block or report user

Report or block blueandhack

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jayliew
jayliew / barcode_scanner_raspbian.py
Created Mar 22, 2018
USB barcode scanner read in Python on Raspberry Pi Raspbian
View barcode_scanner_raspbian.py
# Props to user brechmos for sharing the code here: https://www.raspberrypi.org/forums/viewtopic.php?t=55100
# Tested with the following barcode scanner
# macbook# ioreg -p IOUSB
# <snip>
# | +-o WIT 122-UFS V2.03@14200000 <class AppleUSBDevice, id 0x10000c3c4, registered, matched, active, busy 0 (6 ms), retain 14>
# WIT 122-UFS V2.03:
# Product ID: 0x1010
# Vendor ID: 0x05fe (CHIC TECHNOLOGY CORP)
@lakshmantgld
lakshmantgld / salesTax.md
Last active Aug 31, 2019
Free Sales Tax API based on Postal code by Avalara
View salesTax.md

Sales Tax API

There are many companies providing sales tax API. Out of all the companies, Avalara offers free API service for sales Tax. This gist is all about setting up avalara API and querying it.

The Free-To-Use API by avalara has some restrictions. Usage of this API is subject to rate limits. Users who exceed the rate limit will receive HTTP response code 429 - Too Many Requests. The requirement for this API is to create an avalara free trail account. You can create a free account using this link create free account.

Once you have filled the form from above link, you will get an e-mail containing temporary credentials to login the avalara account. The e-mail will look something like this:

Avalara e-mail

@0x263b
0x263b / colors.md
Last active Aug 15, 2019
Random color from string in javascript
View colors.md

Random color from string in javascript

Consider a list of strings you need to permanently assign a random color.

First you should turn the string into a hash.

var string = "string"
var hash = 0
View surge.conf
[General]
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
# dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
loglevel = notify
[Proxy]
BJ-All = custom
BJ-HK-Azure = custom
BJ-US-Azure = custom
@selsta
selsta / autosub.lua
Last active May 11, 2019
Automatically download subtitles in mpv using subliminal.
View autosub.lua
-- requires subliminal, version 1.0 or newer
-- default keybinding: b
-- add the following to your input.conf to change the default keybinding:
-- keyname script_binding auto_load_subs
local utils = require 'mp.utils'
function load_sub_fn()
subl = "/usr/local/bin/subliminal" -- use 'which subliminal' to find the path
mp.msg.info("Searching subtitle")
mp.osd_message("Searching subtitle")
t = {}
@P233
P233 / ios7-theme-for-v2ex
Last active Dec 9, 2016
体积稍大,需要压缩: http://cssminifier.com/
View ios7-theme-for-v2ex
a:link, a:visited, a:active {
color: #8e8d93;
-webkit-transition: all .15s;
-moz-transition: all .15s;
-ms-transition: all .15s;
-o-transition: all .15s;
transition: all .15s;
}
a.top:link, a.top:visited, a.top:active {
color: #000;
You can’t perform that action at this time.