Skip to content

Instantly share code, notes, and snippets.

View quochoangvp's full-sized avatar
🎯
Focusing

Trịnh Quốc Hoàng quochoangvp

🎯
Focusing
View GitHub Profile
@quochoangvp
quochoangvp / optimise-images-terminal.md
Created March 5, 2021 11:16 — forked from gielcobben/optimise-images-terminal.md
Optimise your pngs from the terminal in OSX

JPG:
$ brew install jpegoptim
$ find . -name "*.jpg" -exec jpegoptim -m80 -o -p --strip-all {} \;

- PNG:
$ brew install optipng
$ find . -name "*.png" -exec optipng -o7 {} \;

@quochoangvp
quochoangvp / homebrew-dynamodb-local.md
Created September 7, 2020 01:46 — forked from dgoguerra/homebrew-dynamodb-local.md
Install dynamodb-local through Homebrew (custom formula)

Install dynamodb-local through Homebrew

An official formula for dynamodb-local existed, but was removed since dynamodb-local is not open source and stopped having versions.

Now its available either through a Cask, or by installing it as a formula from an unofficial tap (third party repo).

When installed as a cask dynamodb-local cannot be exposed as a service, so here we are installing it as a formula. It has been forked from rjcoelho/homebrew-boneyard and updated to be a head-only formula, to avoid checksum erros on new versions. It is available at dgoguerra/homebrew-boneyard.

# dynamodb-local depends on Java 6+
@quochoangvp
quochoangvp / React Native Clear Cache
Created March 5, 2019 10:49 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@quochoangvp
quochoangvp / README.md
Created May 21, 2018 01:48 — forked from magnetikonline/README.md
Compile ssh2 bindings extension for PHP7.

Compile ssh2 bindings extension for PHP7

The current PHP ssh2 extension via PECL won't compile under PHP7.

Using a more recent version via PHP's GitHub we can make this work.

$ sudo apt-get install autoconf libssh2-1-dev
$ curl -LO https://github.com/php/pecl-networking-ssh2/archive/master.zip
$ unzip master.zip
$ cd pecl-networking-ssh2-master
@quochoangvp
quochoangvp / xdebug-php.md
Created November 11, 2017 16:56 — forked from ankurk91/xdebug-mac.md
php xDebug on Ubuntu/Mac and phpStorm 2017

🪲 Install and Configure xDebug on Ubuntu/Mac and PhpStorm 🐘

  • Assuming that you have already installed php and apache
  • Install xDebug php extension
# Ubuntu 16.04, php 7.0
sudo apt-get install php-xdebug

# Ubuntu 14.04, php 5.6 
sudo apt-get install php5-xdebug
@quochoangvp
quochoangvp / 01-extract-sdk.sh
Created October 27, 2017 03:48
Install Android SDK Linux
$ mkdir $HOME/Android
$ tar xvzf android-sdk*.tgz -C $HOME/Android
$ mv $HOME/Android/android-sdk-linux $HOME/Android/Sdk
@quochoangvp
quochoangvp / Linux Static IP
Created September 26, 2017 10:03 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
#!/bin/bash
################################################################################
# Script for installing Odoo V10 on Ubuntu 16.04, 15.04, 14.04 (could be used for other version too)
# Author: Yenthe Van Ginneken
#-------------------------------------------------------------------------------
# This script will install Odoo on your Ubuntu 14.04 server. It can install multiple Odoo instances
# in one Ubuntu because of the different xmlrpc_ports
#-------------------------------------------------------------------------------
# Make a new file:
# sudo nano odoo-install.sh