Skip to content

Instantly share code, notes, and snippets.

View natp0ng's full-sized avatar
🐯

Nut natp0ng

🐯
  • 11:34 (UTC +07:00)
View GitHub Profile
#!/bin/bash
# Step 1: Confirm the path to the .AppImage file
APPIMAGE_PATH="$HOME/Applications/cursor-0.8.6.AppImage"
echo "Using AppImage path: $APPIMAGE_PATH"
# Step 1.5: Download the Cursor logo
ICON_PATH="$HOME/.local/share/icons/cursor-icon.svg"
curl -o $ICON_PATH "https://www.cursor.so/brand/icon.svg"
echo "Downloaded logo to: $ICON_PATH"
#!/bin/bash
# Step 1: Confirm the path to the .AppImage file
APPIMAGE_PATH="$HOME/Applications/cursor-0.8.6.AppImage"
echo "Using AppImage path: $APPIMAGE_PATH"
# Step 1.5: Download the Cursor logo
ICON_PATH="$HOME/.local/share/icons/cursor-icon.svg"
curl -o $ICON_PATH "https://www.cursor.so/brand/icon.svg"
echo "Downloaded logo to: $ICON_PATH"
@natp0ng
natp0ng / install-java-versions.md
Created July 27, 2024 07:07 — forked from ofhouse/install-java-versions.md
Install and manage multiple Java SDK versions on Ubuntu

Install and manage multiple Java versions on Ubuntu

This guide shows per example the installation of the Java SDK versions 8 (LTS, already installed) and 11 (LTS).

1. Check which Java versions are avaialable or already installed

apt --names-only search "openjdk-.*jre$"

> Sorting... Done
@natp0ng
natp0ng / content.md
Created April 11, 2024 14:04 — forked from Mishco/content.md
Setup HashiCorp Vault on docker

Setup HashiCorp Vault on docker

Vault secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing. Vault is primarily used in production environments to manage secrets. Vault is a complex system that has many different pieces. There is a clear separation of components that are inside or outside of the security barrier. Only the storage backend and the HTTP API are outside, all other components are inside the barrier.

Vault_architecture

Figure 1: Architecture of Vault and Spring App (Click to enlarge)

The storage backend is untrusted and is used to durably store encrypted data. When the Vault server is started, it must be provided with a storage backend so that data is available across restarts. The HTTP API similarly must be started by the Vault server on start so that clients can interact with it.

@natp0ng
natp0ng / tmux-cheatsheet.markdown
Created July 10, 2023 06:27 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@natp0ng
natp0ng / setup.sh
Created March 12, 2023 16:41 — forked from jjvillavicencio/setup.sh
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@natp0ng
natp0ng / how-to-git-patch-diff.md
Created November 24, 2021 16:31 — forked from nepsilon/how-to-git-patch-diff.md
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff &gt; some-changes.patch
@natp0ng
natp0ng / README.md
Created August 31, 2021 09:16 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@natp0ng
natp0ng / Jenkinsfile.groovy
Created August 27, 2021 10:45 — forked from aerobless/Jenkinsfile.groovy
An example Jenkinsfile for a build pipeline using gradle, junit, selenium, checkstyle
pipeline {
agent {
label 'agentId' //The id of the slave/agent where the build should be executed, if it doesn't matter use "agent any" instead.
}
triggers {
cron('H */8 * * *') //regular builds
pollSCM('* * * * *') //polling for changes, here once a minute
}
@natp0ng
natp0ng / canonical.brs
Created April 19, 2019 13:17 — forked from jsinai/canonical.brs
A canonical BrightScript that shows how to launch an HTML site that is resident on the player. The entry point is index.html. Works in tandem with canonical.css.
Sub Main(args)
url$ = "file:///index.html"
if args <> invalid and args.Count() > 0 then
url$ = args[0]
end if
print "url = ";url$
DoCanonicalInit()