This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Check redirect destinations work on the dev site | |
SITE_URL="http://localhost:1313" | |
# Start the test server | |
docker-compose up -d | |
# Wait for the test server to start up | |
until $(curl --output /dev/null --silent --head --fail $SITE_URL/); do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Validate the contents of the sitemap | |
# See https://blog.atj.me/2018/05/crawl-sitemap-xml-with-curl/ for inspiration | |
SITEMAP_URI="/sitemap.xml" | |
SITEMAP_URL="http://localhost:1313"$SITEMAP_URI | |
# Start the test server | |
docker-compose up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server: | |
image: klakegg/hugo:0.78.2-ext-ubuntu | |
command: server -D --gc | |
volumes: | |
- "$PWD/src:/src" | |
ports: | |
- "1313:1313" | |
user: "1000:1000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SFML/Graphics.hpp> | |
#include <SFML/Window.hpp> | |
#include <string> | |
#include <iostream> | |
class TileMap : public sf::Drawable, public sf::Transformable | |
{ | |
public: | |
bool load(const std::string& tileset, sf::Vector2u tileSize, const int* tiles, unsigned int width, unsigned int height) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert non-bundle posts into bundles | |
# this function is taken from the accepted answer post here: | |
# https://stackoverflow.com/questions/229186/os-walk-without-digging-into-directories-below | |
def walklevel(some_dir, level=1): | |
some_dir = some_dir.rstrip(os.path.sep) | |
assert os.path.isdir(some_dir) | |
num_sep = some_dir.count(os.path.sep) | |
for root, dirs, files in os.walk(some_dir): | |
yield root, dirs, files |
OlderNewer