Skip to content

Instantly share code, notes, and snippets.

View vtinguan's full-sized avatar
🎯

Vinicius Tinguan vtinguan

🎯
View GitHub Profile
@vtinguan
vtinguan / restart_bluetooth.sh
Created August 19, 2018 20:25 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
@vtinguan
vtinguan / API.md
Created December 18, 2016 21:38 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

#!/bin/bash
#miss java instalation
INSTALL_GIT=$(apt-get install git -y)
DOWNLOAD_GVM=$(curl -s get.gvmtool.net | bash)
$INSTALL_GIT
$DOWNLOAD_GVM
#!/bin/bash
echo 3 > /proc/sys/vm/drop_caches
sysctl -w vm.drop_caches=3
@vtinguan
vtinguan / migration.sh
Last active August 29, 2015 14:19
EXECUTION PARAMS: $1=password, $2=host, $3=db_name, $4=db2_name $5=vol_name
#!/bin/bash
#MAKE BACKUP
mysqldump -u root -h $2 -p$1 --no-create-db --no-create-info --skip-add-drop-table --complete-insert $3 > /$5/$3.sql
if [[ $? != 0 ]]
then
exit 0
fi
echo "" > outputTable.txt
@vtinguan
vtinguan / gist:ed5c20e9675af844d597
Created April 20, 2015 20:14
To run this script, you must use the environment variable file as argument
#!/bin/bash
echo "source $1" >> /etc/profile
@vtinguan
vtinguan / envExport.sh
Created April 20, 2015 19:17
You must run "source <<environment variables file>>" before run the script. To run the script, you must type "bash -x envExport.sh <<envirnment variables file parameters>>"
#!/bin/bash
function migrateVar {
source $1
export $(cut -d= -f1 $1)
}
migrateVar