Skip to content

Instantly share code, notes, and snippets.

View PonyTang3's full-sized avatar

PonyTang3 PonyTang3

View GitHub Profile
@PonyTang3
PonyTang3 / git_branch.sh
Created May 6, 2021 02:21 — forked from dciccale/git_branch.sh
Bash script to get the current git branch and last commit
#!/usr/bin/env bash
# checks if branch has something pending
function parse_git_dirty() {
git diff --quiet --ignore-submodules HEAD 2>/dev/null; [ $? -eq 1 ] && echo "*"
}
# gets the current git branch
function parse_git_branch() {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/"
@PonyTang3
PonyTang3 / INSTALLV8JS.md
Created July 9, 2018 03:58 — forked from koriym/INSTALLV8JS.md
How to install PHP 7.2 and V8Js in Ubuntu
apt update
apt upgrade
apt-get install python-software-properties
add-apt-repository -y ppa:ondrej/php 
add-apt-repository -y ppa:pinepain/libv8-archived
apt update
apt-get install php7.2 php7.2-curl php7.2-dev php7.2-mbstring php7.2-zip php7.2-mysql libv8-dev
pecl install v8js
echo 'extension=v8js.so' >> /etc/php/7.2/cli/conf.d/20-v8js.ini