This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if you have, for instance | |
# root@NAMETHATYOUDONTLIKE : ~ | |
#you can use the following command | |
sudo scutil --set HostName name-you-want | |
#to change it | |
# root@COOLNAMETHATILIKE : ~ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add this content to your .bash_profile file | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' | |
#create a new file called darkside.terminal and add the following content | |
<?xml version="1.0" encoding="UTF-8"?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# if you dont have the tool | |
# apt-get install mysql-client | |
mysql -u [USER] -p[PASS] -h [REMOTE_HOST] [DATABASE_NAME] | |
# after this commmand, the prompt will be | |
# mysql> | |
# and will accept SQL commands | |
# mysql> Select * from yourtable; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install the homebrew, makes our life easy | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
#install react native tool | |
npm install -g create-react-native-app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#restart nginx | |
service nginx restart | |
#restart php | |
service php7.0-fpm restart | |
#list all services running | |
service --status-all | |
#add path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//================================== | |
// ONLY ONE ITEM IN THE CART AT TIME | |
//================================== | |
add_filter( 'woocommerce_add_cart_item_data', 'woo_custom_add_to_cart' ); | |
function woo_custom_add_to_cart( $cart_item_data ) { | |
global $woocommerce; | |
// REMOVE ALL OTHER ITEMS | |
$woocommerce->cart->empty_cart(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- install dependecies | |
npm install | |
# --- install only dev dependencies | |
npm install --only=dev | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --- read only needed information from adb logcat | |
# adb logcat *:<OPTION> | |
#the priorites are (from lowest to highest ) | |
# V — Verbose (lowest priority) | |
# D — Debug | |
# I — Info | |
# W — Warning |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='utf-8'?> | |
<!-- Build version (iOS) and version code (android) --> | |
<widget android-versionCode="1" id="com.your.app" ios-CFBundleVersion="1" version="3.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | |
<!-- Add plugin from local path --> | |
<plugin name="cordova-plugin-YOURPLUGIN" spec="./path/to/custom/plugins/cordova-plugin-YOURPLUGIN" /> | |
</widget> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#--- good resource | |
http://gitready.com/ | |
#--- When you want to commit files that used to be ignored or vice versa | |
git rm -r --cached . | |
git add . | |
git commit -m "Commit follows the .gitignore again" | |
#--- Get the remote URL from a repository | |
git config --get remote.origin.url |