George Mason University Antonin Scalia Law School

PowerShell Script For Semester Batches

This is a script I’ve developed after relying on CMD for so long and needing to use PowerShell to quickly export file names in large .ZIP files. Be sure to run as Administrator and make sure your execution policy is not restricted. You can call the function whatever you like. Export-Csv converts objects into a … Continue reading “PowerShell Script For Semester Batches”

Upgrade wget on CentOS 5

Instruction on how to install wget from the source: cd ~ wget yum -y remove wget tar -xzvf wget-1.16.tar.gz cd wget-1.16 ./configure –with-ssl=openssl –with-libssl-prefix=/usr/lib64/openssl –prefix=/usr make && make install Original article.

Backup and Restore MySQL via MySQLdump

To backup: # mysqldump -u root -p[password] database_name > database_name_backup.sql [password] should be placed immediately after -p. For example: -pmypassword. database_name_backup.sql would be created in the root directory. To restore: Create an appropriately named database on the target machine Load the file using the mysql command: # mysql -u [uname] -p[pass] [db_to_restore] < [backupfile.sql] To … Continue reading “Backup and Restore MySQL via MySQLdump”

Speed Up Site Performance

Set HTTP Cache Headers <VirtualHost *:80> # Your config… ExpiresActive On <FilesMatch “\.(ico|gif|jpe?g|png|js|css)$”> ExpiresDefault “access plus 1 year” Header unset ETag FileETag None Header unset Last-Modified </FilesMatch> </VirtualHost> Gzip Web Server Output <VirtualHost *:80> # Your config… AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript BrowserMatch ^Mozilla/4 gzip-only-text/html BrowserMatch ^Mozilla/4\.0[678] no-gzip BrowserMatch \\bMSIE … Continue reading “Speed Up Site Performance”

Frequently Used Linux Command Lines

Install WordPress wget tar xfz latest.tar.gz cp -r * ~/public_html/your/website/folder/ Change Permissions (rwx => 4 + 2 + 1 = 7) For Directories: find /path/to/your/directory/ -type d -exec chmod 755 {} \; For Files: find /path/to/your/file/ -type f -exec chmod 644 {} \; Permissions chmod -R 755 directory chmod -R 644 files Remove files … Continue reading “Frequently Used Linux Command Lines”