Skip to content

Instantly share code, notes, and snippets.

View peerapongsam's full-sized avatar
🍩
Learning

Peerapong Samarnpong peerapongsam

🍩
Learning
View GitHub Profile
@peerapongsam
peerapongsam / exchangerate.json
Last active October 2, 2023 04:44
exchangerate
{"rates":{"USD":1.06,"THB":38.83},"base":"EUR","date":"2023-10-02"}
@peerapongsam
peerapongsam / adb+
Last active February 12, 2020 16:18
#!/bin/bash
# Script adb+
# Usage
# You can run any command adb provides on all your currently connected devices
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command>
#
# Examples
# ./adb+ version
# ./adb+ install apidemo.apk
# ./adb+ uninstall com.example.android.apis
#!/bin/bash
# Script adb+
# Usage
# You can run any command adb provides on all your currently connected devices
# ./adb+ <command> is the equivalent of ./adb -s <serial number> <command>
#
# Examples
# ./adb+ version
# ./adb+ install apidemo.apk
# ./adb+ uninstall com.example.android.apis
@peerapongsam
peerapongsam / mac-os-screencapture-shadow.sh
Created December 2, 2019 04:02
mac-os-screencapture-shadow.sh
# Remove shadow from screen shot
defaults write com.apple.screencapture disable-shadow -bool true ; killall SystemUIServer
# Add shadow from screen shot
defaults write com.apple.screencapture disable-shadow -bool false ; killall SystemUIServer
@peerapongsam
peerapongsam / line-notify.php
Created August 24, 2019 14:33
line-notify.php
function send_notify_curl($message, $token) {
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://notify-api.line.me/api/notify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
@peerapongsam
peerapongsam / README.md
Created April 23, 2019 03:14
set-up-new-mac

#Set Up New Mac

Brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

zsh

brew install zsh

Oh My Zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

100% — FF
99% — FC
98% — FA
97% — F7
96% — F5
95% — F2
94% — F0
93% — ED
92% — EB
91% — E8
@peerapongsam
peerapongsam / .DS_Store
Last active May 16, 2018 07:52
How to install shared printer on macOS
@peerapongsam
peerapongsam / generating-gpg-ssh-key.md
Last active March 27, 2018 01:48
Generating GPG & SSH Key

Generating GPG Key

$ gpg --gen-key
gpg (GnuPG) 1.4.22; Copyright (C) 2015 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Git Cheat Sheet

Undo Merge

git checkout develop
git reset --hard af861e4
git checkout feature/register
git reset --hard 26cf460
git checkout develop
git merge feature/register --no-ff