Skip to content

Instantly share code, notes, and snippets.

@hardyscc
hardyscc / github-actions-runner-on-wsl.md
Last active June 16, 2026 12:51
Github Actions Runner on WSL

Github Actions Runner on WSL

Disable auto proxy

create file %USERPROFILE/.wlsconfig

[wsl2]
autoProxy=false

Claude Code with Copilot API

install

npm install -g copilot-api
copilot-api start --claude-code
npm install -g @anthropic-ai/claude-code
@hardyscc
hardyscc / roblox-dev-setup.md
Last active November 20, 2025 12:13
Roblox Dev Setup
@hardyscc
hardyscc / macos-latest-setup.md
Last active March 19, 2026 11:07
MacOS latest setup

Oh My Zsh

Install

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
@hardyscc
hardyscc / podman-on-mac.md
Last active November 24, 2024 05:34
Podman on Mac

Podman on Mac

Install

brew install docker-compose kind podman podman-desktop

Check Kind images

@hardyscc
hardyscc / sonarqube-microk8s.md
Created November 21, 2024 14:34
Sonarqube on MicroK8s
@hardyscc
hardyscc / microk8s.md
Last active November 21, 2024 14:38
Setup MicroK8s

Setup MicroK8s

Install microk8s

sudo apt-get update
sudo apt-get upgrade -y

sudo snap install microk8s --classic --channel=1.31/stable
sudo microk8s status --wait-ready
@hardyscc
hardyscc / postgres-db-init.sql
Created November 11, 2024 09:31
Postgres Database Initialization
--Create user xxx_dba
create user xxx_dba with encrypted password 'Dba12345';
--Create app user
create user xxx_user with encrypted password 'User12345';
--Create xxx database (db owner = xxx_dba)
create database xxx with owner xxx_dba;
--Change db to xxx without change user
@hardyscc
hardyscc / HostnameFromIp.md
Last active August 12, 2024 14:50
HostnameFromIp.java
echo "import java.net.InetAddress; \
public class HostnameFromIp { \
    public static void main(String[] args) throws Exception { \
        var startTime = System.currentTimeMillis(); \
        System.out.println(InetAddress.getByName(args[0]).getHostName() + \
                \" - \" + (System.currentTimeMillis() - startTime) + \"ms\"); \
    } \
}" > HostnameFromIp.java
@hardyscc
hardyscc / get-java-opts-proxy
Last active July 24, 2024 09:06
get-java-opts-proxy
#!/bin/sh
# Usage: export JAVA_TOOL_OPTIONS=`get-java-opts-proxy`
local_http_proxy=${HTTP_PROXY:-$http_proxy}
if [ -n "$local_http_proxy" ] ; then
if [ $? -eq 0 ]; then # If variable has username and password, its parse method different
http_proxy_host=$(echo $local_http_proxy | sed 's/http:\/\/.*@\(.*\):.*/\1/')
http_proxy_port=$(echo $local_http_proxy | sed 's/http:\/\/.*@.*:\(.*\)/\1/' | tr -d "/")