Skip to content

Instantly share code, notes, and snippets.

View natp0ng's full-sized avatar
🐯

Nut natp0ng

🐯
  • 14:03 (UTC +07:00)
View GitHub Profile
@natp0ng
natp0ng / MySQL_macOS_Sierra.md
Created August 25, 2018 11:04 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@natp0ng
natp0ng / mac-setup-redis.md
Created August 25, 2018 11:14 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@natp0ng
natp0ng / android_emu_start.sh
Created September 3, 2018 15:48 — forked from stackedsax/android_emu_start.sh
Script for starting up multiple android emulators per box
#!/bin/bash
#####
#
# This script creates android emulators on the fly.
#
# Please refer to the README for usage instructions.
#
####
@natp0ng
natp0ng / README.md
Created September 3, 2018 15:49 — forked from markusfisch/README.md
Handy shell script that eases building and running Android apps from the command line with ant and adb

Handy Android shortcuts

This little script eases building, running, testing and analyzing Android apps with [ant][2] and [adb][1].

You may also see it as interactive dictionary of useful [adb commands][1].

How to use

@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()
@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 / 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 / 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 / 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 / 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