Skip to content

Instantly share code, notes, and snippets.

View chaeya's full-sized avatar
😀

Kevin Kim chaeya

😀
View GitHub Profile
@chaeya
chaeya / sesman.ini
Created September 18, 2023 01:25
XRDP sesman.ini for HamoniKR
[Globals]
ListenAddress=127.0.0.1
ListenPort=3350
EnableUserWindowManager=true
UserWindowManager=startwm.sh
DefaultWindowManager=startwm.sh
[Security]
AllowRootLogin=true
MaxLoginRetry=4
@chaeya
chaeya / startwm.sh
Last active September 18, 2023 01:39
xrdp X session start script
#!/bin/sh
# xrdp X session start script (c) 2015, 2017 mirabilos
# published under The MirOS Licence
if test -r /etc/profile; then
. /etc/profile
fi
if test -r /etc/default/locale; then
. /etc/default/locale
@chaeya
chaeya / build.md
Created February 1, 2023 07:29 — forked from ravecat/README.md
debootstrap, livecd

A live CD or live DVD is a complete bootable Linux operating system loaded from a CD or DVD. Although there are a lots of live Linux CDs, for seemingly every taste and purpose, it might still be useful on occasion to build your own. This guide details the steps to build a bootable live CD/DVD based on Debian “wheezy”.

Step 1 – Installing the necessary software

These are the software packages you need to install on your Debian system:

apt-get install xorriso live-build syslinux squashfs-tools

Step 2 – Create a basic filesystem

@chaeya
chaeya / xrandr-set.sh
Created November 29, 2022 08:26
vivobook screen resolution control at office
#!/bin/bash
screen_count=$(xrandr -q |grep -w "connected" | wc -l)
if [ $screen_count = "2" ]; then
xrandr --output eDP-1 --mode 2880x1800 --scale 0.5x0.5 --pos 0x0 --rotate normal --output DP-3 --primary --mode 3440x1440 --scale 1x1 --pos 2880x0 --rotate normal
else
xrandr --output eDP-1 --mode 2880x1800 --scale 1.2x1.2 --pos 0x0 --rotate normal --primary
fi
@chaeya
chaeya / v6.0.10-hamonikr1.patch
Created November 29, 2022 05:10
linux kernel v6.0.10 ASUS VivoBook S5402ZA keyboard disable patch
diff -crB a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
*** a/drivers/gpio/gpiolib-acpi.c 2022-11-28 20:03:26.825171988 +0900
--- b/drivers/gpio/gpiolib-acpi.c 2022-11-28 20:18:28.049389594 +0900
***************
*** 1590,1595 ****
--- 1590,1609 ----
.ignore_interrupt = "AMDI0030:00@18",
},
},
+ {
--- a/drivers/acpi/resource.c 2022-10-26 19:53:32.000000000 +0900
+++ b/drivers/acpi/resource.c 2022-10-27 21:42:53.732581293 +0900
@@ -399,6 +399,31 @@
{ }
};
+static const struct dmi_system_id asus_laptop[] = {
+ {
+ .ident = "Asus Vivobook K3402ZA",
+ .matches = {
#!/bin/bash
sudo apt install -y vim git xclip
[ ! -f ~/.ssh/id_ed25519.pub ] && exec ssh-keygen -t ed25519 -C "[email protected]"
cat ~/.ssh/id_ed25519.pub | xclip -selection clipboard
cat ~/.ssh/id_ed25519.pub
xdg-open "https://github.com/settings/keys" &
[ ! -d ./dev-settings ] && git clone [email protected]:chaeya/dev-settings.git
dev-settings/dev-setting.sh
@chaeya
chaeya / install.sh
Created August 12, 2020 08:12 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@chaeya
chaeya / rotate_desktop.sh
Created April 18, 2020 07:14 — forked from mildmojo/rotate_desktop.sh
Script to rotate the screen and touch devices on modern Linux desktops. Great for convertible laptops.
#!/bin/bash
#
# rotate_desktop.sh
#
# Rotates modern Linux desktop screen and input devices to match. Handy for
# convertible notebooks. Call this script from panel launchers, keyboard
# shortcuts, or touch gesture bindings (xSwipe, touchegg, etc.).
#
# Using transformation matrix bits taken from:
# https://wiki.ubuntu.com/X/InputCoordinateTransformation
@chaeya
chaeya / post_install.sh
Created October 15, 2018 08:18 — forked from waleedahmad/post_install.sh
Ubuntu post installation script for installing software of your choice.
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
else
#Update and Upgrade
echo "Updating and Upgrading"
apt-get update && sudo apt-get upgrade -y