Skip to content

Instantly share code, notes, and snippets.

@qn-ng
qn-ng / install_cron_notify.sh
Last active January 3, 2019 11:49
Tao thong bao nhac viec tu dong bang cron + notify-send (Ubuntu Gnome)
#!/bin/bash
##### Tao script notify.sh
do_notify=`cat<<"EOF"
#!/bin/bash
# Lay PID cua moi truong desktop (gnome-session)
PID=$(pgrep gnome-sessio -n -U $UID)
# Thoat neu user chua login vao moi truong desktop
@qn-ng
qn-ng / captcha.py
Created October 13, 2016 17:29
PoC Captcha Regconizer - BKHCM
# you might need to install tesseract or tesseract-ocr from your os pkg manager
from urllib import request
from PIL import Image
from PIL import ImageFilter
from pytesseract import pytesseract
def extract(file):
# load img and convert it to grayscale