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 bw && for i in *.jpg; do convert $i -colorspace Gray bw/$i; done |
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
for f in *\ *; do mv "$f" "${f// /_}"; done |
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
<meta name="viewport" content="width=device-width, initial-scale=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
//http://snook.ca/archives/javascript/simplest-jquery-slideshow | |
(function($){ | |
$.fn.simplestSlideShow = function(settings){ | |
var config = { | |
'timeOut': 3000, | |
'speed': 'normal' | |
}; | |
if (settings) $.extend(config, settings); | |
this.each(function(){ | |
var $elem = $(this); |
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
Cleaning a (typical) Hacked Site | |
- Create backup of site | |
- Deactivate any unnecessary plugins. Delete any plugins and themes that are not in use. | |
- Update all plugins and WordPress through WP admin. We'll replace everything later, but this allows any database updates to happen. | |
- Download wordpress.org/latest.zip. | |
- Download fresh copies of every plugin. | |
- If ACF 4.x installed, upload ACF 5.x and go through database updates (if multi-site, have to go through each site as of now). Then delete ACF 4.x and add-on plugins. | |
- Review wp-config.php to make sure there is no malicious code. If not confident, install fresh copy of wp-config.php with correct database information. | |
- Deactivate site by commenting out database info in wp-config.php | |
- Delete all files and folders in root directory except wp-config.php and wp-content/, and possibly any non-WP folders such as emails. |
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
cat ~/.ssh/id_rsa.pub | ssh root@example.com 'cat - >> ~/.ssh/authorized_keys' |
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
.navbar-toggle .icon-bar:nth-of-type(2) { | |
top: 1px; | |
} | |
.navbar-toggle .icon-bar:nth-of-type(3) { | |
top: 2px; | |
} | |
.navbar-toggle .icon-bar { | |
position: relative; |
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 http://wordpress.org/latest.tar.gz && tar -xzvf latest.tar.gz && cp -r wordpress/* . && rm -rf wordpress |