Skip to content

Instantly share code, notes, and snippets.

View bhowe's full-sized avatar

Blake Howe bhowe

View GitHub Profile
@bhowe
bhowe / magento-verus-woo
Created October 24, 2016 23:58
pros and con of magento and woo
Magento
Magento is a great platform for your business if you have the development resources; finances and budget and want an scalable system for the future
Pros of Magento
• Open-source so you can tweak it as much as you want with zero licensing fees.
• Feature-rich Packed with features that an Ecommerce store needs in the core code
• Large community of users, developers, and service-providers
• Optimized for large stores
• Multiple Online Stores in One
Change links to HTTPS static site
cd /path/to/your/website
find ./ -type f -exec sed -i 's/http:/https:/g' {} \;
@bhowe
bhowe / push-to-github-from-cloud9
Created January 7, 2017 16:52
Push to github from cloud9
# works the same as git from command line on any machine
# will need to connect cloud9 - github via ssh key
# Go here and create a new key https://c9.io/account/ssh
# copy the key
# go to https://github.com/settings/keys set key
wiseguys:~/workspace (master) $ git add .
wiseguys:~/workspace (master) $ git commit -m 'few updates'
blah
@bhowe
bhowe / wp-rename.php
Last active January 30, 2017 13:22
changes url refs in the db
<?php
/**
* Form action attribute.
*
* @return null
*/
function sr_form_action( ) {
global $step;
echo basename( __FILE__ ) . '?step=' . intval( $step + 1 );
@bhowe
bhowe / log-file-parsing-for-seo.txt
Last active April 18, 2017 10:43
Log file parsing for SEO
Top Command Line Tips: Apache Access Log
tail - view the end of file/input, last 10 lines by default.
-f - append new lines as the file grows
head - view the start of a file/input
grep - search a file/input
-E - extended regular expressions
-f - get search patterns from file
sort - err...
@bhowe
bhowe / common-vulnerabilities.txt
Last active April 18, 2017 10:44
Most common Wordpress Plugin (Software) vulnerabilities
Insecure file upload handling (this is the cause of the most exploited type of vulnerability, arbitrary file upload)
Deserialization of untrusted data
Security issues with functions accessible through WordPress’ AJAX functionality (those are a common source of disclosed vulnerabilities these days)
Persistent cross-site scripting (XSS) vulnerabilities in publicly accessible portions of the plugin
Cross-site request forgery (CSRF) vulnerabilities in the admin portion of plugins
SQL injection vulnerabilities (the code that handles requests to the database)
Reflected cross-site scripting (XSS) vulnerabilities
Lack of protection against unintended direct access of PHP files
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC]
RewriteRule ^(.*)$ — [F,L]
RewriteCond %{QUERY_STRING} \.\.\/ [NC,OR]
RewriteCond %{QUERY_STRING} boot\.ini [NC,OR]
RewriteCond %{QUERY_STRING} tag\= [NC,OR]
RewriteCond %{QUERY_STRING} ftp\: [NC,OR]
RewriteCond %{QUERY_STRING} http\: [NC,OR]
@bhowe
bhowe / ai-resources.txt
Created May 21, 2017 13:06
Various AI resource I run across
http://aiplaybook.a16z.com/docs/guides/dl-architectures
https://google.ai/
UNBUNTU
/etc/php/5.6/cli/php.ini is for the CLI PHP program, which you found by running php on the terminal.
/etc/php/5.6/cgi/php.ini is for the php-cgi system which isn't specifically used in this setup.
/etc/php/5.6/apache2/php.ini is for the PHP plugin used by Apache. This is the one you need to edit for changes to be applied for your Apache setup.
/etc/php/5.6/fpm/php.ini is for the php5-fpm processor, which is a fastcgi-compatible 'wrapper' for PHP processing (such as to hand off from NGINX to php5-fpm) and runs as a standalone process on the system (unlike the Apache PHP plugin)
@bhowe
bhowe / Test tls 1.2 for authorize
Created October 3, 2017 15:34
Update from Authorize coming int 2018
<?php
/*
The 'S' in "HTTPS" is the TLS protocol. When folks refer to the "TLS" they are referring to the most common of
modern protocols of encrypting data across the internet.
*/
// check the tls version
$ch = curl_init( "https://smartzweb.com" );