Skip to content

Instantly share code, notes, and snippets.

@tylermakin
tylermakin / ec2-ftp-tutorial.md
Last active March 30, 2024 05:13
Tutorial for configuring FTP access to an EC2 server
@matt-bailey
matt-bailey / customer_account.xml
Last active July 3, 2023 23:10
Disable My Account sidebar links in Magento 2
<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<!-- Remove unwanted account navigation links -->
@hans2103
hans2103 / server.badbots
Last active May 8, 2024 17:33
NGINX to block bad bots. (add Twenga|TwengaBot if you want to exclude them too)
if ($http_user_agent ~* (360Spider|80legs.com|Abonti|AcoonBot|Acunetix|adbeat_bot|AddThis.com|adidxbot|ADmantX|AhrefsBot|AngloINFO|Antelope|Applebot|BaiduSpider|BeetleBot|billigerbot|binlar|bitlybot|BlackWidow|BLP_bbot|BoardReader|Bolt\ 0|BOT\ for\ JCE|Bot\ mailto\:craftbot@yahoo\.com|casper|CazoodleBot|CCBot|checkprivacy|ChinaClaw|chromeframe|Clerkbot|Cliqzbot|clshttp|CommonCrawler|comodo|CPython|crawler4j|Crawlera|CRAZYWEBCRAWLER|Curious|Curl|Custo|CWS_proxy|Default\ Browser\ 0|diavol|DigExt|Digincore|DIIbot|discobot|DISCo|DoCoMo|DotBot|Download\ Demon|DTS.Agent|EasouSpider|eCatch|ecxi|EirGrabber|Elmer|EmailCollector|EmailSiphon|EmailWolf|Exabot|ExaleadCloudView|ExpertSearchSpider|ExpertSearch|Express\ WebPictures|ExtractorPro|extract|EyeNetIE|Ezooms|F2S|FastSeek|feedfinder|FeedlyBot|FHscan|finbot|Flamingo_SearchEngine|FlappyBot|FlashGet|flicky|Flipboard|g00g1e|Genieo|genieo|GetRight|GetWeb\!|GigablastOpenSource|GozaikBot|Go\!Zilla|Go\-Ahead\-Got\-It|GrabNet|grab|Grafula|GrapeshotCrawler|GTB5|GT\:\:WWW|Guzz
@hootlex
hootlex / laravellocal.md
Last active June 26, 2024 08:56
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
# use this inside lib/Zend to make the version of ZF usable with php 5.6
sed -i "s/'internal_encoding'/'default_charset'/g" ./XmlRpc/Client.php ./Service/Audioscrobbler.php ./Service/Technorati.php ./Locale/Format.php ./Validate/Hostname.php ./Validate/StringLength.php
@herveguetin
herveguetin / 001_customer_account_navigation_active_link.xml
Last active March 3, 2016 16:27
Add custom active links to customer account navigation in Magento
@jonathonbyrdziak
jonathonbyrdziak / magento.conf
Last active June 18, 2020 17:55
A configuration file for magento under nginx.
#####################################################
#
# Provided by the Magento Support Center
# http://magentosupport.help/knowledgebase/configuring-nginx-to-work-with-magento-advanced/
#
# Your Magento Tutorial specialists
#
server {
listen *:8080;
server_name fanatik.redrokk.com www.fanatikbike.com fanatikbike.com;
@deanrather
deanrather / get-timezone.php
Last active March 22, 2018 15:49
Get Timezone with PHP
<?php
echo getTimezone("Sydney");
function getTimezone($location)
{
$location = urlencode($location);
$url = "http://maps.googleapis.com/maps/api/geocode/json?address={$location}&sensor=false";
$data = file_get_contents($url);
// Get the lat/lng out of the data
$data = json_decode($data);
@ashfame
ashfame / magento-set-defaults-address.php
Created June 13, 2013 14:40
Programmatically set default billing/shipping address of customers if they are not set in magento
<?php
require_once ("app/Mage.php");
umask(0);
Mage::app("default");
$collection = Mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('*');
foreach ($collection as $customer) {
@markshust
markshust / manualcron.php
Last active December 13, 2017 04:44
Magento - run cronjobs manually from CLI
<?php
/*
Given:
<foo_bar_baz>
<schedule>
<cron_expr>0 0 * * *</cron_expr>
</schedule>
<run>
<model>foo/bar::baz</model>
</run>