Skip to content

Instantly share code, notes, and snippets.

View kokoye2007's full-sized avatar

kokoye2007 kokoye2007

View GitHub Profile
@kokoye2007
kokoye2007 / thai-id-card.py
Created July 16, 2021 13:54 — forked from bouroo/thai-id-card.py
Thai National ID Card reader in python
#!/usr/bin/env python
# bouroo<[email protected]>
# 07.04.2019
# sudo apt-get -y install pcscd python-pyscard python-pil
import binascii
import io
import os
import sys
from PIL import Image
@kokoye2007
kokoye2007 / ssh_login_espeak.sh
Created July 11, 2021 07:19
SSH - User Login Logout
#! /bin/sh
# ForceCommand /root/ssh-wrapper in /etc/ssh/sshd_config
# add logger options when needed
log="logger -t ssh-wrapper"
# find IP address
ip=`echo $SSH_CONNECTION | cut -d " " -f 1`
$log $USER login from $ip
espeak "$USER just logged in from $ip" > /dev/null 2>&1
@kokoye2007
kokoye2007 / Screen_Rotate_Disable
Created March 18, 2020 05:19
Screen_Rotate_Disable
# Try to Normal
xrandr -o normal
sudo systemctl stop iio-sensor-proxy.service
sudo systemctl disable iio-sensor-proxy.service
# Try this command to remove
@kokoye2007
kokoye2007 / Music_Resource.md
Last active October 18, 2023 22:24
Ukulele - Guitar - Note - Chord - PDF -Turner - Detector
@kokoye2007
kokoye2007 / wallpaper-changer.md
Last active January 12, 2020 10:16
Wallpaper Changer Resource

Wallpaper Changer - Script

bash

  • Wallpaper Change in Command
gsettings set org.gnome.desktop.background picture-uri
  • Random Change
targetDir="/home/username/Photos"
@kokoye2007
kokoye2007 / music-score.md
Created January 4, 2020 07:46
Music Service and Note
@kokoye2007
kokoye2007 / ImageMagick-PDF2JPG
Last active December 13, 2019 23:14
ImageMagick PDF 2 JPG
<policy domain="coder" rights="read | write" pattern="PDF" />
ust before </policymap> in /etc/ImageMagick-7/policy.xml and that makes it work again, but not sure about the security implications of that.
<policy domain="coder" rights="none" pattern="{PS,PS2,PS3,EPS,PDF,XPS}" />
@kokoye2007
kokoye2007 / old-snap-remove.sh
Created August 4, 2019 10:35
Sanp Old Version Remove
#!/bin/bash
# Removes old revisions of snaps
# CLOSE ALL SNAPS BEFORE RUNNING THIS
set -eu
LANG=C snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
@kokoye2007
kokoye2007 / build.sh
Created April 18, 2019 17:07 — forked from Forst/build.sh
Ubuntu ISO with preseed.cfg generation script
#!/bin/bash
## FORSTWOOF UBUNTU PRESEED :: BUILD SCRIPT
# Quit on first error
set -e
# Temporary directory for the build
TMP="/var/tmp/ubuntu-build"