This file contains 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
/* size of a specific table */ | |
SELECT table_name AS "Table", round( ( ( data_length + index_length ) / 1024 / 1024 ), 2 ) "Size in MB" | |
FROM information_schema.TABLES | |
WHERE table_schema = "YOUR_DB_NAME" AND table_name = "YOUR_TBL_NAME"; | |
/* size of every table in every database */ | |
SELECT table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES |
This file contains 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
git remote rename origin bitbucket | |
git remote add origin https://github.com/USER/PROJECT.git | |
git push origin master | |
git remote rm bitbucket |
This file contains 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
wget -A.png,.jpg,.gif,.jpeg -e robots=off -m -k -nv -np -p \ --user-agent="Mozilla/5.0 (compatible; Konqueror/3.0.0/10; Linux)" \ http://site.url/ | |
# -A comma-separated list of accepted extensions. | |
# -e execute a `.wgetrc'-style command. | |
# -m shortcut for -N -r -l inf --no-remove-listing. | |
# -k make links in downloaded HTML or CSS point to local files. | |
# -nv turn off verboseness, without being quiet. | |
# -np don't ascend to the parent directory. | |
# -p get all images, etc. needed to display HTML page. |
This file contains 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
# Split file "bigfile.sql" by SIZE | |
split -b 10[k|m] bigfile.sql bigfile.spl. | |
# or LENGTH | |
split -l 10 bigfile.sql bigfile.spl. | |
# bigfile.spl.aa | |
# bigfile.spl.ab | |
# bigfile.spl.ac |
This file contains 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
# Compiled source | |
# --------------------------- | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
*.map |
This file contains 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
defaults write com.apple.screencapture location /Users/USER/Bilder/Screenshots | |
killall SystemUIServer |
This file contains 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
# Convert .iso to .img. OS X will create a ".img.dmg", don't rename it | |
hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/os.iso | |
# Remove your USB device and run | |
diskutil list | |
# Insert USB device and run diskutil again | |
diskutil list | |
# Determine the device node assigned to your flash media (e.g. /dev/disk2) |
This file contains 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
#!/usr/bin/env bash | |
# update | |
echo ">>> Updating packages list" | |
sudo apt-get update && apt-get upgrade | |
# install base packages | |
echo ">>> Installing base packages" | |
sudo apt-get install -y python-software-properties build-essential wget curl vim nano zip |
OlderNewer