Skip to content

Instantly share code, notes, and snippets.

@stevygee
stevygee / wp2static_v7_wpml.php
Last active May 10, 2022 10:04
Add WPML translations to WP2Static v7
<?php
function sg_get_translated_posts_urls() {
$default_lang = apply_filters( 'wpml_default_language', NULL );
$ids = get_posts( array(
'fields' => 'ids',
'post_type' => array( 'post', 'page' ),
'numberposts' => -1,
'suppress_filters' => true, // Get posts in all languages
) );
@nealtodd
nealtodd / wagtail-on-zappa.md
Last active July 30, 2021 17:44 — forked from tomdyson/wagtail-on-zappa.md
Wagtail on AWS Lambda, with Zappa

Wagtail on AWS Lambda, with Zappa

Aim

A demonstration of Wagtail running on AWS Lambda + API Gateway using Zappa for deployment.

This is not a Production solution, it is an insecure setup focusing solely on getting Wagtail to run on Lambda in the simplest way possible (and at zero cost if it is not used beyond this demonstration (or close to zero depending on how much you exercise the S3 bucket)).

caveat emptor!

@radeksvarz
radeksvarz / pytest.ini
Created March 1, 2017 18:55
Pytest and django - check admin pages of own apps - reading
[pytest]
addopts = --reuse-db
DJANGO_SETTINGS_MODULE = settings.dev
python_files = tests.py test_*.py *_tests.py
@JosefJezek
JosefJezek / ubuntu-apps.sh
Last active April 29, 2017 22:08
Ubuntu Apps Script
#!/bin/bash
# Ubuntu Apps
# Tested on Ubuntu 14.04 LTS
CODENAME=$(lsb_release -cs)
get() {
sudo apt-get -y install $@
}