Skip to content

Instantly share code, notes, and snippets.

@quentinhayot
quentinhayot / dynamodb-copy-table.py
Created November 28, 2018 12:59
Copy data from a dynamodb table to another
#!/usr/bin/python2
# Forked from https://github.com/techgaun/dynamodb-copy-table
# USAGE: AWS_PROFILE=your_profile AWS_DEFAULT_REGION=your_region python dynamodb-copy-table.py "source_table" "destination_table"
from boto.dynamodb2.exceptions import ValidationException
from boto.dynamodb2.fields import HashKey, RangeKey
from boto.dynamodb2.layer1 import DynamoDBConnection
from boto.dynamodb2.table import Table
from boto.exception import JSONResponseError
@quentinhayot
quentinhayot / fix-wordpress-permissions.sh
Created April 6, 2017 15:41 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@quentinhayot
quentinhayot / gist:ecd73b0aa18e8a63df69
Created August 7, 2015 10:24
[Xcode] Increment build number on each release builld
##Build phases > Run Script
##Shell: /bin/bash
if [ "${CONFIGURATION}" = "Release" ]; then
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_FILE"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"