Skip to content

Instantly share code, notes, and snippets.

Avatar

Achim Rosenhagen arosenhagen

View GitHub Profile
@andyshinn
andyshinn / Dockerfile
Last active Oct 7, 2021
Postal on Docker
View Dockerfile
FROM ruby:2.3-onbuild
VOLUME /opt/postal/config
ENV LOG_TO_STDOUT 1
ENV AM_CONFIG_ROOT /opt/postal/config
RUN gem install procodile
RUN apt-get update -qq && apt-get install -yqq nodejs
@piotrekkaminski
piotrekkaminski / gist:9bc45ec84028611d621e
Last active Oct 14, 2019
How to automatically download patches and release of Magento
View gist:9bc45ec84028611d621e
1) First you need to generate download token. Login to your account on magento.com and generate it in Account Settings->Downloads Access Token
2) You will need your MAGEID as well. It is shown at the top-left in your account page.
3) curl -k https://MAGEID:TOKEN@www.magentocommerce.com/products/downloads/info/help
4) Profit!
View package2modman.php
<?php
/**
* Generate modman file from Magento Connect 2.0 package.xml
*
* Usage:
*
* php package2modman.php path/to/package.xml > path/to/modman
*
*/
require_once(__DIR__ . "/../www/app/Mage.php");
@herveguetin
herveguetin / shipping_method_renderer_available.phtml
Last active May 14, 2017
Use renderers for shipping methods in Magento
View shipping_method_renderer_available.phtml
<dl class="sp-methods">
<?php $shippingCodePrice = array(); ?>
<?php $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates): ?>
<?php echo Mage::helper('your_module/shipping')->getShippingRatesHtml($code, $_rates, $_sole); ?>
<?php endforeach; ?>
</dl>
@konklone
konklone / ssl.rules
Last active Sep 11, 2021
nginx TLS / SSL configuration options for konklone.com
View ssl.rules
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@supairish
supairish / gist:2951524
Created Jun 18, 2012
Nginx - how to limit requests by User Agent
View gist:2951524
http {
map $http_user_agent $limit_bots {
default '';
~*(google|bing|yandex|msnbot) $binary_remote_addr;
}
limit_req_zone $limit_bots zone=bots:10m rate=1r/m;
server {
@GUI
GUI / install_vagrant_sudoers.sh
Created Jun 3, 2012 — forked from beddari/install_vagrant_sudoers.sh
Allow Vagrant sudo-access without password for NFS-setup (for OS X)
View install_vagrant_sudoers.sh
#!/bin/bash
# Script for placing sudoers.d files with syntax-checking
# Making a temporary file to contain the sudoers-changes to be pre-checked
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/su root -c echo '*' >> /etc/exports
@colinmollenhour
colinmollenhour / A-repo-moved.md
Created Mar 28, 2012
REPO MOVED! (Cm_Cache_Backend_File)
View A-repo-moved.md
@tzusman
tzusman / default.rb
Created Sep 30, 2011
Chef Recipe for MySQL backups to Amazon's S3
View default.rb
#
# Cookbook Name:: s3_backups
# Recipe:: default
# Author:: Todd Zusman (toddzusman.com)
#
execute "apt-get update" do
action :nothing
end