This file contains hidden or 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/python3 | |
import argparse | |
import os | |
parser = argparse.ArgumentParser() | |
parser.add_argument("input") | |
parser.add_argument("-o") | |
args = parser.parse_args() | |
input_name, input_extension = os.path.splitext(args.input) |
This file contains hidden or 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
{{/* People Widget */}} | |
{{/* Initialise */}} | |
{{ $ := .root }} | |
{{ $page := .page }} | |
{{ $show_social := $page.Params.design.show_social | default false }} | |
{{ $show_interests := $page.Params.design.show_interests | default true }} | |
{{ $show_organizations := $page.Params.design.show_organizations | default false }} | |
<div class="row justify-content-center people-widget"> |
This file contains hidden or 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
variables: | |
GIT_SUBMODULE_STRATEGY: recursive | |
GIT_SSL_NO_VERIFY: "true" | |
pages: | |
image: monachus/hugo:latest | |
before_script: | |
- apt-get update -y -qq | |
- apt-get install git -y -qq | |
- git submodule update --init --recursive |
This file contains hidden or 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
# Found here | |
# https://stackoverflow.com/questions/4205854/python-way-to-recursively-find-and-replace-string-in-text-files | |
import os, fnmatch | |
def findReplace(directory, find, replace, filePattern): | |
for path, dirs, files in os.walk(os.path.abspath(directory)): | |
for filename in fnmatch.filter(files, filePattern): | |
filepath = os.path.join(path, filename) | |
with open(filepath) as f: | |
s = f.read() |