- Download and make it executable
wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
sudo cp MailHog_linux_amd64 /usr/local/bin/mailhog
sudo chmod +x /usr/local/bin/mailhog
- Make MailHog as a service
# Mailhog | |
MAIL_DRIVER=smtp | |
MAIL_HOST=0.0.0.0 | |
MAIL_PORT=1025 | |
MAIL_USERNAME=null | |
MAIL_PASSWORD=null | |
MAIL_ENCRYPTION=null |
from paypalrestsdk.resource import List, Find, Create, Post, Update, Replace, Resource | |
from paypalrestsdk.api import default as default_api | |
import paypalrestsdk.util as util | |
from paypalrestsdk.exceptions import MissingParam | |
class Sale(Find, Post): | |
"""Sale class wrapping the REST v1/payments/sale endpoint | |
Usage:: |
from celery import Celery | |
from celery.signals import after_task_publish,task_success,task_prerun,task_postrun | |
# first argument, current module | |
app = Celery('tasks') | |
app.config_from_object('celeryconfig') | |
# To instantiate celery and import this module | |
# do: celery -A task worker --loglevel=info | |
# after, once celery is running, instantiate a python console: |
# Empty |
For helpful resources on overriding Magento controllers, blocks, models, helpers, etc. see Josh Pratt's post on Magento: Overriding Core Files (Blocks, Models, Resources, Controllers)
Here's a list of search results that I've found most helpful; otherwise good luck with the Googling!
#!/bin/bash - | |
export AWS_ACCESS_KEY=<your aws access key> | |
export AWS_SECRET_KEY=<your aws secret> | |
date_current=`date -u +%Y-%m-%d` | |
aws rds describe-db-snapshots --snapshot-type "automated" --db-instance-identifier <db_instance_name> | grep `date +%Y-%m-%d` | grep rds | tr -d '",' | awk '{ print $2 }' > /tmp/sandbox-snapshot.txt | |
snapshot_name=`cat /tmp/<db_instance_name>-snapshot.txt` | |
target_snapshot_name=`cat /tmp/<db_instance_name>-snapshot.txt | sed 's/rds://'` |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
module OS | |
def OS.windows? | |
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil | |
end | |
def OS.mac? | |
(/darwin/ =~ RUBY_PLATFORM) != nil |
#!/bin/sh | |
# https://github.com/phracker | |
# | |
# AutoDL-Irssi Init Script | |
# Tested on Debian 7 (Wheezy) | |
# Instructions: | |
# - Install / configure irssi + autodl-irssi (duh) | |
# - Save this script as /etc/init.d/autodl-irssi | |
# - `chmod +x /etc/init.d/autodl-irssi` | |
# - `insserv autodl-irssi` |
#!/usr/bin/perl | |
# | |
# tracker_modify.pl 0.01 | |
# Add/delete trackers recursively from all torrents. | |
# Free to copy and mutilate any way you like :) | |
# | |
# Originally from http://publicbt.com/tracker_modify.pl | |
sub usage { | |
print <<EOF |