Skip to content

Instantly share code, notes, and snippets.

View kokoye2007's full-sized avatar

kokoye2007 kokoye2007

View GitHub Profile
@kokoye2007
kokoye2007 / vpnbook.sh
Created January 10, 2025 14:51
This Bash script automates connecting to free VPNBook servers by fetching available servers, extracting configurations, and handling authentication, allowing you to securely connect with just a few selections.
#!/bin/bash
# Ko Ko Ye - [email protected]
# vpnbook.com
# deepseek.com
# Function to check if a command exists
command_exists() {
command -v "$1" >/dev/null 2>&1
}
@kokoye2007
kokoye2007 / github-desktop-ubuntu.sh
Created November 12, 2024 02:43
Ubuntu Github-Desktop
wget -qO - https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main" > /etc/apt/sources.list.d/shiftkey-packages.list'
sudo apt update && sudo apt install github-desktop
@kokoye2007
kokoye2007 / shellcheck-apply.yaml
Created November 5, 2024 04:57
github actions shellcheck apply
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.7.2.1
# https://github.com/koalaman/shellcheck/issues/2222#issuecomment-840648212
hooks:
- id: shellcheck
name: Check sh files
entry: bash -c 'shellcheck $@ -f diff | patch -p 1' --
@kokoye2007
kokoye2007 / temporary-email-address-domains
Last active July 16, 2024 18:15
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 <[email protected]>
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