Skip to content

Instantly share code, notes, and snippets.

View kokoye2007's full-sized avatar

kokoye2007 kokoye2007

View GitHub Profile
@kokoye2007
kokoye2007 / temporary-email-address-domains
Last active February 8, 2023 05:52
temporary-email-address-domains.txt
027168.com
0815.ru
0815.ry
0815.su
0845.ru
0box.eu
0clickemail.com
0-mail.com
0n0ff.net
0nelce.com
@kokoye2007
kokoye2007 / ky.sh
Created August 17, 2022 14:04 — forked from clux/ky.sh
kubectl get yaml without managedFields
# kubectl < 1.21
ky() {
local -r resource="${1:-$(kubectl api-resources --no-headers | choose 0 | fzf)}"
local -r name="${2:-$(kubectl get ${resource} --no-headers | choose 0 | fzf)}"
kubectl get "${resource}" "${name}" -oyaml \
| yq 'del(.metadata.managedFields)' -y \
| bat -l=yaml --plain --theme=DarkNeon
}
# kubectl >= 1.21
- https://github.com/maaslalani/slides | Terminal based presentation tool
- https://marp.app/ | Markdown Presentation Ecosystem
- https://github.com/slideshow-s9 | Write Your Slides / Talks / Presentations in Plain Text with Markdown Formatting Conventions - Free Web Alternative to PowerPoint and Keynote
- https://gitlab.com/da_doomer/markdown-slides | Using markdown, write simple but beautiful presentations with math, animations and media.
- https://present.readthedocs.io/en/latest/ | A terminal-based presentation tool with colors and effects
- https://github.com/muryoimpl/slippr | markdown presentation app by Electron
- https://hackmd.io/
- https://revealjs.com/ | THE HTML PRESENTATION FRAMEWORK
diff --git a/setup.py b/setup.py
index dda37f5..20854fd 100755
--- a/setup.py
+++ b/setup.py
@@ -70,7 +70,7 @@ else:
pkg_config_cflags = subprocess.check_output(['pkg-config', '--cflags', 'libpcsclite'])
platform_extra_compile_args += shlex.split(pkg_config_cflags.decode())
except:
- platform_include_dirs = ['/usr/include/PCSC', '/usr/local/include/PCSC']
+ platform_include_dirs = ['usr/include/PCSC', 'usr/local/include/PCSC', '/snap/cryptnox/current/usr/include/PCSC', '/snap/cryptnox/current/usr/local/include/PCSC']
@kokoye2007
kokoye2007 / pyscard-patch.patch
Created November 6, 2021 03:52
snap for pyscard patch
From 6dd501199c1323a49f2e64e75c886a1d0b652577 Mon Sep 17 00:00:00 2001
From: kokoye2007 <kokoye2007@gmail.com>
Date: Thu, 20 Feb 2020 18:05:59 +0100
Subject: [PATCH] setup.py: add typical snapcraft location of PCSC
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
@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
@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 / 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<bouroo@gmail.com>
# 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