Skip to content

Instantly share code, notes, and snippets.

Ellie Evans evansekeful

Block or report user

Report or block evansekeful

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@evansekeful
evansekeful / amazon-ec2-fullsetup-linux1.md
Created Jan 21, 2019
Quick Commands for Setting Up AWS EC2 Website Server - Amazon Linux v1
View amazon-ec2-fullsetup-linux1.md

This is an abbreviated guide based on Amazon's tutorials and piecemealed advice from around the web to set-up a standard website server instance with EC2. For complete explanations regarding Amazon LAMP, visit this link: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html

Security Inbound Rules:

HTTP 80 0.0.0.0/0
HTTPS 443 0.0.0.0/0
Custom TCP Rule 1024 - 1048 0.0.0.0/0
Custom TCP Rule 20 - 21 0.0.0.0/0

View mssql.txt
# Find duplicate SKUs in a table
SELECT [SKU], COUNT([SKU]) AS NumOccurences
FROM [DB].[dbo].[TABLE]
Group by [SKU]
HAVING ( Count([SKU]) > 1)
# Find duplicate SKUs in a table, return with other columns
SELECT *
FROM [DB].[dbo].[TABLE]
WHERE [SKU] IN
@evansekeful
evansekeful / amazon-ec2-fullsetup.md
Last active Jan 21, 2019
Quick Commands for Setting Up AWS EC2 Website Server - Amazon Linux2
View amazon-ec2-fullsetup.md

This is an abbreviated guide based on Amazon's tutorials and piecemealed advice from around the web to set-up a standard website server instance with EC2. For complete explanations regarding Amazon LAMP, visit this link: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-lamp-amazon-linux-2.html

Security Inbound Rules:

HTTP 80 0.0.0.0/0
HTTPS 443 0.0.0.0/0
Custom TCP Rule 1024 - 1048 0.0.0.0/0
Custom TCP Rule 20 - 21 0.0.0.0/0

View excel_formulas_ref.txt
# Check if value is in a sheet/column A, return bool
=IF(ISERROR(VLOOKUP(A2,'Sheet1'!A:A, 1, FALSE)),FALSE,TRUE )
# Index-Match value in A, return value in B
=INDEX(Sheet1!B:B, MATCH(A2,Sheet1!A:A,0))
# Update SQL key-pair
@evansekeful
evansekeful / wp-write-breadcrumb.php
Last active Oct 3, 2017
Wordpress Write Breadcrumb
View wp-write-breadcrumb.php
/**
* http://www.bloggingtips.com/2009/02/22/create-a-breadcrumb-trail/
**/
function write_breadcrumb() {
$pid = $post->ID;
$trail = '<a href="'.get_site_url().'/">'. __('Home', 'textdomain') .'</a>';
if (is_front_page()) {
// do nothing
}
elseif (is_page()) {
@evansekeful
evansekeful / wc-remove-related-products.php
Created Jun 27, 2017
WooCommerce Remove Related Products
View wc-remove-related-products.php
@evansekeful
evansekeful / remove-core-updates.php
Created Jun 27, 2017
Wordpress Remove Core Updates Function
View remove-core-updates.php
function remove_core_updates(){
global $wp_version;return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_core_updates');
add_filter('pre_site_transient_update_plugins','remove_core_updates');
add_filter('pre_site_transient_update_themes','remove_core_updates');
You can’t perform that action at this time.