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
@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
UPDATE: | |
I used 'sudo tasksel install lamp-server' instead of 'sudo tasksel' (then selecting) to stop the SSH problems I've been having with ubuntu 12.04 | |
@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | |
Create a amazon aws account (http://aws.amazon.com) and enter the AWS management dashboard (https://console.aws.amazon.com/ec2/home). Select the EC2 tab at the top of the dashboard. | |
1) Create a Security Group that allows HTTP connections and limited SSH to configure the instance. Click on Security Groups > Create Security Group | |
- Name: web_access |
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 install git | |
git config --global user.name Bill Johnston | |
***Doesn't have to be username*** | |
git config --global user.email [email protected] | |
***Should be email associated w/ github account*** | |
ssh-keygen -t rsa -C "[email protected]" |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
#If you want any directories ignored uncomment and edit line below | |
#RewriteRule ^(dash|admin)($|/) - [L] | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
#If in sub directory, add before index.php (ex: admin/index.php) | |
RewriteRule . index.php [L] |
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
<?php | |
/////////////////paste wpArray here///////////////// | |
/////////////////paste wpArray here///////////////// | |
require_once('wp-load.php' ); | |
global $wpdb; |
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
function smartCrop($height,$width,$endHeight,$endWidth){ | |
$heightWidth=''; | |
if($height <= $endHeight || $width <= $endWidth){ | |
$height = round($endWidth*$height/$width); | |
if($height < $endHeight){ | |
$width = round($endHeight*$width/$height); | |
$heightWidth = "width:".$width."px"; | |
} | |
else{ |
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
ssl with cheapssl and apache2 | |
-Purchase a ssl certificate | |
sudo a2enmod ssl | |
sudo /etc/init.d/apache2 restart | |
sudo mkdir /etc/apache2/ssl | |
cd /etc/apache2/ssl | |
******EDIT THE LINE BELOW WITH DOMAIN****** | |
sudo openssl req -new -nodes -newkey rsa:2048 -keyout MYDOMAIN.key -out MYDOMAIN.csr |
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
Download phantomjs binary from http://phantomjs.org/download.html | |
upload to home directory (or where-ever really) | |
Un-tar the file with: | |
******************** | |
tar xvjf phantomjs-1.6.1-linux-i686-dynamic.tar.bz2 | |
******************** |
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
In Transmit go to: | |
Transmit > Preferences > Cloud | |
Select default extension. | |
Create a new header with the following values: | |
Name: x-amz-acl | |
Value: public-read |
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
.DS_Store | |
node_modules/ | |
.nodemonignore |
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
var phantom = require('node-phantom-simple'); | |
var user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36'; | |
var page = 'http://google.com' | |
phantom.create(function (phantom_err, ph) { | |
ph.createPage(function (page_err, page) { | |
page.open(page, function (open_err, status) { | |
page.evaluate(function(){ | |
return navigator.userAgent; | |
}, function(err, result){ |
OlderNewer