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
find . -type d -exec chmod 755 {} \; | |
find . -type f -exec chmod 644 {} \; |
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
SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120) | |
FROM information_schema.processlist | |
WHERE command <> 'Sleep' | |
AND info NOT LIKE '%PROCESSLIST%' | |
ORDER BY time DESC LIMIT 50; |
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
sudo locale-gen "en_US.UTF-8" && sudo dpkg-reconfigure locales |
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
#!/bin/bash | |
# | |
# video conversion script for publishing as HTML 5 video, via videojs (with hd button extension) | |
# 2011 by zpea | |
# feel free to use as public domain / Creative Commons CC0 1.0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
# | |
FFMPEG=/usr/bin/ffmpeg | |
HD_SUFFIX='_hd' |
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
DELETE FROM tablename | |
WHERE id IN ( | |
SELECT id FROM ( | |
SELECT id, ROW_NUMBER() OVER (partition BY column1, column2, column3 ORDER BY id) AS rnum | |
FROM tablename | |
) t | |
WHERE t.rnum > 1 | |
); |
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
dpkg --get-selections|grep 'linux-image*'|awk '{print $1}'|egrep -v "linux-image-$(uname -r)|linux-image-generic" |while read n;do apt-get -y remove $n;done |
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 the repositories | |
sudo apt-get update && sudo apt-get install -y curl | |
curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | sudo apt-key add - | |
echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" | sudo tee /etc/apt/sources.list.d/freeswitch.list | |
sudo apt-get update | |
# install dependencies | |
sudo apt-get install -y yasm nasm libyuv-dev libvpx2-dev liblua5.2-dev libvpx2-dev libvpx2 zlib1g-dev libspeex1 libopus-dev libsndfile-dev autoconf automake devscripts gawk g++ git-core 'libjpeg-dev|libjpeg62-turbo-dev' libncurses5-dev 'libtool-bin|libtool' make python-dev gawk pkg-config libtiff5-dev libperl-dev libgdbm-dev libdb-dev gettext libssl-dev libcurl4-openssl-dev libpcre3-dev libspeex-dev libspeexdsp-dev libsqlite3-dev libedit-dev libldns-dev libpq-dev yasm nasm unixodbc-dev unixodbc-bin unixodbc odbc-postgresql |
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
#!/bin/bash | |
#Backup Databases | |
#echo "Backing up Databases" | |
#'/home/mrogers/Projects/Databases/automysqlbackup-v3.0_beta3/automysqlbackup' '/home/mrogers/Projects/Databases/automysqlbackup-v3.0_beta3/automysqlbackup.conf' | |
#Sync back the directories. | |
echo "Backing up Home Folder" | |
#rsync -avh --progress --del /home/mrogers/ /media/mrogers/CRUZER/mrogers/ | |
#rsync -avh --progress --delete-before --force --stats --ignore-errors --exclude '*.vdi' --exclude 'Videos/*' /home/mrogers/ /media/mrogers/CRUZER/mrogers/ |
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
#sudo add-apt-repository ppa:webupd8team/sublime-text-3 | |
#sudo add-apt-repository ppa:nilarimogard/webupd8 | |
#sudo add-apt-repository ppa:me-davidsansome/clementine | |
#sudo add-apt-repository ppa:webupd8team/java | |
#sudo add-apt-repository ppa:linrunner/tlp | |
#sudo add-apt-repository ppa:libreoffice/ppa | |
#sudo add-apt-repository ppa:pdoes/ppa | |
#sudo add-apt-repository ppa:webupd8team/y-ppa-manager | |
#sudo add-apt-repository ppa:git-core/ppa | |
#sudo add-apt-repository ppa:chris-lea/node.js |
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
sudo apt-get update && sudo apt-get dist-upgrade --yes && sudo apt-get install --yes python-software-properties software-properties-common;\ | |
sudo add-apt-repository ppa:webupd8team/java --yes && sudo add-apt-repository ppa:git-core/ppa --yes;\ | |
sudo apt-get update && sudo apt-get dist-upgrade --yes;\ | |
sudo apt-get install --yes git curl postgresql postgresql-contrib oracle-java7-installer nginx htop zip unzip weex;\ | |
curl -s http://get.sdkman.io | bash ; source ~/.sdkman/bin/sdkman-init.sh ; \ | |
mkdir -p ~/tomcat/; cd ~/tomcat/; wget http://www.us.apache.org/dist/tomcat/tomcat-7/v7.0.72/bin/apache-tomcat-7.0.72.tar.gz; tar -xvf apache-tomcat-7.0.72.tar.gz ; \ | |
cd apache-tomcat-7.0.72/webapps/ ; rm -rf ~/tomcat/apache-tomcat-7.0.72/webapps/* ;\ | |
ssh-keygen; cat ~/.ssh/id_rsa.pub;\ | |
mkdir -p ~/app/; cd ~/app/ |