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
awk -F. '!a[$NF]++{print $NF}' |
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
awk -F\" '{print $(NF-1)}' |
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
mysqlimport -u root -p<password or prompt> -f --local <database> `pwd`/*.csv &> ../db_insert.log |
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
find . -name '*.sql' | awk '{ print "source",$0 }' | mysql --batch -u xxx -p <database> |
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
sudo service mysql stop | |
sudo mkdir /ebs1/etc /ebs1/lib /ebs1/log | |
sudo mv /etc/mysql /ebs1/etc | |
sudo mv /var/lib/mysql /ebs1/lib | |
sudo mv /var/log/mysql /ebs1/log | |
sudo mkdir /etc/mysql /var/lib/mysql /var/log/mysql | |
echo "/ebs1/etc/mysql /etc/mysql none bind" | sudo tee -a /etc/fstab | |
sudo mount /etc/mysql | |
echo "/ebs1/lib/mysql /var/lib/mysql none bind" | sudo tee -a /etc/fstab | |
sudo mount /var/lib/mysql |
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
set-alias installutil $env:windir\microsoft.net\framework\v2.0.50727\installutil | |
installutil -i "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\Redist\Microsoft.SqlServer.Management.PSProvider.dll" | |
installutil -i "C:\Program Files\Microsoft SQL Server\100\Tools\Binn\Redist\Microsoft.SqlServer.Management.PSSnapins.dll" | |
Add-PSSnapin SqlServerCmdletSnapin100 | |
Add-PSSnapin SqlServerProviderSnapin100 | |
$SERVER_NAME="<SERVER NAME>"; $DB_NAME="<DB NAME>";$Tables = invoke-sqlcmd -query "SELECT name FROM sys.tables order by name" -database $DB_NAME -serverinstance $SERVER_NAME;foreach ($Table in $Tables){$TableName = $Table["name"];write-host -ForegroundColor Green "Creating File $TableName.csv";invoke-sqlcmd -query "SELECT * FROM $TableName" -database $DB_NAME -serverinstance $SERVER_NAME |export-csv -path D:\dump\$TableName.csv;} |
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
# ~/.profile: executed by the command interpreter for login shells. | |
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login | |
# exists. | |
# see /usr/share/doc/bash/examples/startup-files for examples. | |
# the files are located in the bash-doc package. | |
# the default umask is set in /etc/profile; for setting the umask | |
# for ssh logins, install and configure the libpam-umask package. | |
#umask 022 |
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
"""Benchmark multiple method of removing duplicates in a list | |
while keeping item's order in the list. | |
numpy.unique will likely be faster and more efficient | |
the more the list grows. | |
If a list is submitted to numpy.unique, it will be transformed and flattened | |
into a numpy.Array which it's data structure is more efficient than standard | |
lists since all elements have the same size in memory therefor requires less | |
access to the memory. Lists are stored as array of adresses pointing to | |
to the objects and requires more memory access (but more flexible). |
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
cd /usr/local/share | |
wget http://phantomjs.googlecode.com/files/phantomjs-1.9.7-linux-x86_64.tar.bz2 | |
tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2 | |
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs | |
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs | |
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs |
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
mkdir lib | |
cd lib | |
wget http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.10.4/PyQt-x11-gpl-4.10.4.tar.gz | |
tar xvf PyQt-x11-gpl-4.10.4.tar.gz | |
cd PyQt-x11-gpl-4.10.4/ | |
python configure.py | |
make && make install | |