Skip to content

Instantly share code, notes, and snippets.

View kokoye2007's full-sized avatar

kokoye2007 kokoye2007

View GitHub Profile
@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 / music-score.md
Created January 4, 2020 07:46
Music Service and Note
@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_Resource.md
Last active October 18, 2023 22:24
Ukulele - Guitar - Note - Chord - PDF -Turner - Detector
@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 / 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 / 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 / ubuntu-xenial-armfh-qemu.md
Created July 17, 2021 02:28 — forked from takeshixx/ubuntu-xenial-armfh-qemu.md
Running Ubuntu 16.04.1 armhf on Qemu

Running Ubuntu 16.04.1 armhf on Qemu

This is a writeup about how to install Ubuntu 16.04.1 Xenial Xerus for the 32-bit hard-float ARMv7 (armhf) architecture on a Qemu VM via Ubuntu netboot.

The setup will create a Ubuntu VM with LPAE extensions (generic-lpae) enabled. However, this writeup should also work for non-LPAE (generic) kernels.

The performance of the resulting VM is quite good, and it allows VMs with >1G ram (compared to 256M on versatilepb and 1G on versatile-a9/versatile-a15). It also supports virtio disks whereas versatile-a9/versatile-a15 only support SD cards via the -sd argument.

Get netboot files

@kokoye2007
kokoye2007 / tmate_for_ssh.md
Last active July 25, 2021 05:45 — forked from brett-schneider/tmate_for_ssh.md
Ubuntu(systemd) tmate service for ssh

The motivation is: reverse ssh to remote computer, the only thing needed is that the remote is connected to the Internet.

  1. On 18.04 or older remote, get tmate, put it in /usr/local/bin (20.04 is 2.4.0 but has issues /w -F [tmate-io/tmate#204]):
curl -L https://github.com/tmate-io/tmate/releases/download/2.4.0/tmate-2.4.0-static-linux-amd64.tar.xz|tar xJv
sudo mv tmate-2.4.0-static-linux-amd/tmate /usr/local/bin
  1. Put public keys in ~/.ssh/authorized_keys