Skip to content

Instantly share code, notes, and snippets.

View rohsyl's full-sized avatar
🔍
Looking for opportunity

wu rohsyl

🔍
Looking for opportunity
View GitHub Profile
@rohsyl
rohsyl / switch_to_mysql_native_password.md
Last active December 30, 2023 19:09
MariaDB switch to mysql_native_password

Switch to mysql_native_password plugin

By default MariaDB use the unix_socket plugin to authenticate users.

But it's easier to use mysql_native_password for dev (and only for dev because it's way less secure).

Get root access

sudo su
@rohsyl
rohsyl / 00-fast-install.md
Last active January 22, 2021 20:48
Quantya Raspberry PI - Install

Fast install procedure

We will install the raspberry from an existing image.

Write image on SD card

Run the follwing command to identify the device (ex. /dev/mmcblk0)

lsblk -p 
@rohsyl
rohsyl / minecraftServerLaunch.py
Created October 30, 2019 11:59 — forked from huserg/minecraftServerLaunch.py
Minecraft server launch python script
#!/usr/bin/env python
import os
import sys
u_id = 1000
ram = "8"
minimum_ram = "8"
screen_name = "WuShaolinsMinecraftServer"
java_app_name = "spigot-1.13.2"

Create a custom Raspbien flashable image

https://medium.com/platformer-blog/creating-a-custom-raspbian-os-image-for-production-3fcb43ff3630

Recently, me and my fellow team mate Tharindu Muhandiram ran into a bit of an issue with regard to building a custom image for our Platformer IoT Gateway. The issue we had was: we had a working pi with Raspbian OS installed in a memory card and we have added some additional libraries and scripts to it to get our IoT solution working. All the tests were passing and everything was ok. Here goes our issue.

In order for us rollout our IoT solution seamlessly, we had to repeat the above process manually for each device. ie, flash the base Raspbian OS and boot it up, manually add libraries and scripts we need. This is going to be a cumbersome task and we hate manual repeating tasks. To avoid this we decided to build a custom image from an already working device and flash that image to the other devices.

We went through so many tutorials, videos etc to achieve this, but no

@rohsyl
rohsyl / install_nvidia_driver.sh
Created September 10, 2019 05:56
Ubuntu 18.04 NVIDIA Driver
#!/bin/bash
# This script allow you to install the drivier for your Nvidia GPU.
# Run as administrator
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
if [ $1 ] then
@rohsyl
rohsyl / 00_linux_ppp_config.md
Last active September 5, 2019 16:39
Configure Swisscom GPRS with PPP

How to configure ppp gprs linux (debian)

Fistly, we need to install PPP server

sudo apt-get install ppp

Switch to root permission

sudo su
@rohsyl
rohsyl / default_perm_linux.txt
Created June 28, 2019 08:25
How to set default permissions on a directory
setfacl -d -m g::rwx /<directory> //set group to rwx default
getfacl /<directory>