Skip to content

Instantly share code, notes, and snippets.

@jeop10
jeop10 / readme.md
Last active February 1, 2024 05:44
Backup MySQL to Amazon S3 using AWS CLI

Backup MySQL to Amazon S3 using AWS CLI

Based on this awesome gist

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-) ** Using the AWS CLI (aws command) **

1 - Install aws-cli more info on the official repo

Install aws-cli

1) Get the latest available packages
sudo apt-get update
2) Install PHP7 and relevant extensions
Core PHP:
sudo apt-get install php7.0-fpm php7.0-cli php7.0-common php7.0-curl
Extensions needed for Craft:
@aaronwaldon
aaronwaldon / 1) readme.md
Last active March 24, 2023 14:25
How to set up Gulp for Craft CMS. Includes SASS compilation and minification, JavaScript minification, livereloading, and browser sync.

How to set up Gulp with a Craft CMS project

I freaking love working with technologies like Gulp, and wanted to share how to get my current Craft front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, ExpressionEngine, etc).

Project Directory Structure

  • project root/
    • craft/
      • templates/
  • (your craft template files)
@hootlex
hootlex / laravellocal.md
Last active June 11, 2024 19:08
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
@derekmartinla
derekmartinla / amazon-autocomplete
Last active December 12, 2023 04:56
Leverage Amazon To Find High Commercial Intent Keywords
/**********************************************************************************************************************
* Amazon Autocomplete Tool
* Leverage the Amazon Autocomplete feature to find highly commercial keyword opportunities.
* Export the results for efficient importing into Google Adwords
* Version 1.0
* Created By: Derek Martin
* DerekMartinLA.com or MixedMarketingArtist.com
**********************************************************************************************************************/
var hashMapResults = {};
using System;
namespace FortyOneShades
{
class Program
{
static int[] values = new int[]{
0x276AD9,
0x3E6FD9,
0x3A6FDE,
@Stanback
Stanback / nginx.conf
Last active June 14, 2024 10:21 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@bavington
bavington / eu_cookie_banner.js
Last active May 17, 2022 06:22
Simple EU Cookie Law Banner JavaScript
@d3m3vilurr
d3m3vilurr / feedly_api.md
Last active March 30, 2024 08:21
Unofficial Feedly API Document

IDs

  • user_id - user/:uid
  • feed_id - feed/:feed_uri
  • category_id - :user_id/category/:category (special category: global.all, global.uncategorized)
  • tag_id - :user_id/tag/:tag (special tag: global.saved)

APIs

http://cloud.feedly.com/:version/:api

@luke
luke / migrate_zerigo_to_route53.py
Last active February 6, 2016 19:44
Migration script for moving from Zerigo DNS to Amazon Route 53.
import logging
import zerigodns
import boto
from boto.route53.record import ResourceRecordSets
from boto.s3.website import RedirectLocation
# There is no API for these so we have to embed and lookup
# https://forums.aws.amazon.com/thread.jspa?threadID=116724
# http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region