Skip to content

Instantly share code, notes, and snippets.

@n1trux
n1trux / asound.state
Created August 17, 2015 10:08
asound.state for Toshiba Chromebook 2 (CB30-B-104)
state.Intel {
control.1 {
iface CARD
name 'HDMI/DP,pcm=3 Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
@jonbeebe
jonbeebe / asound.state
Created October 24, 2015 09:48 — forked from n1trux/asound.state
asound.state for Toshiba Chromebook 2 (CB30-B-104)
state.Intel {
control.1 {
iface CARD
name 'HDMI/DP,pcm=3 Jack'
value false
comment {
access read
type BOOLEAN
count 1
}
@copperlight
copperlight / .bashrc
Created August 11, 2016 16:27
Window Subsystem for Linux ssh-agent Configuraton
# ... more above ...
# wsfl bash is not a login shell
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
@jonbeebe
jonbeebe / list_splice.py
Last active September 6, 2021 07:14
Port of JavaScript Array.prototype.splice() to Python 3
def list_splice(target, start, delete_count=None, *items):
"""Remove existing elements and/or add new elements to a list.
target the target list (will be changed)
start index of starting position
delete_count number of items to remove (default: len(target) - start)
*items items to insert at start index
Returns a new list of removed items (or an empty list)
"""
@PureMath86
PureMath86 / pdf_table_with Tesseract
Created September 27, 2017 22:23 — forked from jaganadhg/pdf_table_with Tesseract
Extract Data from PDF table using Python Image. Image Magick and tesseract
#Refer http://craiget.com/extracting-table-data-from-pdfs-with-ocr/
import Image, ImageOps
import subprocess, sys, os, glob
# minimum run of adjacent pixels to call something a line
H_THRESH = 300
V_THRESH = 300
def get_hlines(pix, w, h):
"""Get start/end pixels of lines containing horizontal runs of at least THRESH black pix"""