Skip to content

Instantly share code, notes, and snippets.

@bcastellano
bcastellano / raspberry-pi-cups.md
Last active July 1, 2024 02:13
Configure Raspberry to be print server with cups and adding HP LaserJet 1020
@cmod
cmod / hugofastsearch.md
Last active July 8, 2024 01:15 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to craigmod.com and press CMD-/ and start typing.

Fast Search

@jimmymcp
jimmymcp / .multi-stage-azure-pipelines.yml
Created September 24, 2019 12:25
Example multi-stage YAML pipeline for Azure DevOps
trigger:
- '*'
pool:
name: Default
variables:
image_name: mcr.microsoft.com/businesscentral/sandbox
container_name: Build
company_name: My Company
@dannguyen
dannguyen / README.md
Last active July 6, 2024 16:36
Using Python 3.x and Google Cloud Vision API to OCR scanned documents to extract structured data

Using Python 3 + Google Cloud Vision API's OCR to extract text from photos and scanned documents

Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.

The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.

On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:

####### 1. A low-resolution photo of road signs

@SurealCereal
SurealCereal / bootgui
Created June 19, 2015 13:30
Bash script to enable/disable the GUI on boot for Ubuntu Mate. Tested on Ubuntu Mate 15.04 on a Raspberry Pi 2 B.
#!/bin/bash
# Call with either enable or disable as first parameter
if [[ "$1" == 'enable' || "$1" == 'disable' ]]; then
sudo systemctl set-default multi-user.target --force
sudo systemctl $1 lightdm.service --force
sudo systemctl $1 graphical.target --force
sudo systemctl $1 plymouth.service --force
else
echo Call with either "enable" or "disable" as first parameter.
fi
@thesagarsutar
thesagarsutar / README.md
Last active August 29, 2015 14:18 — forked from oodavid/README.md

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@dynamicguy
dynamicguy / install-opencv-2.4.11-in-ubuntu.sh
Last active April 3, 2024 20:20
install opencv-2.4.11 in ubuntu
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev
@robertmarsal
robertmarsal / gist:9feaa9150926efa4175a
Created December 17, 2014 21:09
Install f.lux on Ubuntu 14.10
sudo apt-get install python-glade2 python-appindicator
git clone https://github.com/Kilian/f.lux-indicator-applet.git
cd f.lux-indicator-applet
chmod +x setup.py
sudo ./setup.py install
fluxgui
@vasuman
vasuman / sonicwall.py
Created July 14, 2014 17:49
Sonicwall auto-login
#!/usr/bin/env python2
# Dependencies:
# * Requests
# Simply change stuff and run the script
import time
import re
from hashlib import md5
@tomleo
tomleo / type-notes.rst
Last active May 6, 2019 00:59
Opensource Fonts

Serif

Libre Caslon:

http://www.impallari.com/projects/overview/libre-caslon-display-and-text

Domine:

http://www.google.com/fonts/specimen/Domine