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
| python manage.py makemessages --locale=en --no-wrap --ignore='ght' --ignore='locale' --ignore='config' --ignore='working_groups' --ignore='articles' --ignore='node_modules' --ignore='content' --ignore='blog' --ignore='search' --ignore='site_finder' --ignore='_latest' --ignore='users' --ignore='avatar' --ignore='drug_development_process_map' --ignore='site_templates' --ignore='countries' --ignore='apps' --ignore='ght_site' --ignore='process_map' &&\ | |
| python fake_translate.py locale/en/LC_MESSAGES/django.po locale/fr/LC_MESSAGES/django.po &&\ | |
| python manage.py compilemessages --locale=fr |
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/env python | |
| # -*- python -*- | |
| # Usage: python fake_translate.py inputfile.po outputfile.po | |
| import re | |
| import sys | |
| import polib |
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/local/bin/bash | |
| for filename in *.png; do | |
| convert "$filename" "${filename%.*}.pdf"; | |
| done |
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
| sed -E -e 's/^#.*//' \ | |
| -e 's/"(.*)"/\1/' \ | |
| -e 's/\\n//' \ | |
| -e 's/(msgid_plural|msgstr|msgid)(\[[0-1]\])?//' \ | |
| locale/en-gb/LC_MESSAGES/django.po \ | |
| | awk 'NF' \ | |
| | wc -w |
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
| #!/bin/sh | |
| # Each author and committer's name and email will be replaced by an anonymous value | |
| # Create a git alias | |
| # git change-commits GIT_AUTHOR_NAME "old name" "new name" | |
| git config alias.change-commits '!'"f() { VAR=\$1; OLD=\$2; NEW=\$3; shift 3; git filter-branch --env-filter \"if [[ \\\"\$\`echo \$VAR\`\\\" = '\$OLD' ]]; then export \$VAR='\$NEW'; fi\" \$@; }; f " | |
| # Git valriables to replace with git log formats to generate a list of values toi change | |
| declare -a formats=("GIT_AUTHOR_NAME::%aN" "GIT_AUTHOR_EMAIL::%aE" "GIT_COMMITTER_NAME::%cN" "GIT_COMMITTER_EMAIL::%cE"); |
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
| #!/bin/sh | |
| if [[ "$@" == "" ]]; then | |
| echo "$0: No files specified" | |
| echo "$0 <file> [<file2>]" | |
| exit 1 | |
| fi | |
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
| function nestToLibrary { | |
| name=$1 | |
| if [ -z "$name" ]; then | |
| echo 'No module name provided' | |
| return 1; | |
| fi | |
| nest generate library "${name}" | |
| rm libs/${name}/src/${name}.* | |
| git mv apps/cynomi/src/${name}/* libs/${name}/src | |
| rm -rf "apps/cynomi/src/${name}" |
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
| const AWS = require('aws-sdk'); | |
| const getDistribution = async (client, bucket) => { | |
| const params = { MaxItems: '100' }; | |
| for (;;) { | |
| const { DistributionList: { Items: DistributionItems, IsTruncated, NextMarker } } = await client.listDistributions(params).promise(); | |
| if (!DistributionItems) continue; | |
| for (const distribution of DistributionItems) { | |
| const { Origins } = distribution | |
| if (!Origins?.Items) continue; |
OlderNewer