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
set -x | |
set -e | |
# e.g. folder to process e.g. "frontend/" | |
migration_folder=$1 | |
find_regex=".*/*.tsx?" # mach all .ts and .tsx files | |
# include trailing path "/" in folder parameter: e.g "frontend/" instead of just "frontend" | |
ignore_path="*/$1node_modules/*" | |
# Back up your files or change sed argument -i to -i.bak to generate backup files | |
find $migration_folder -regextype posix-egrep -regex $find_regex -type f -not -path $ignore_path | xargs sed -i -E '/[(class)(")]/{ | |
s/([mp])l(-[0-5])/\1s\2/g |
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
"""Pass multiple parametrs into Django filter. | |
Inspired by http://stackoverflow.com/a/24402622/2629036. | |
By this filters you can chain as many variables into parametrs as you like. | |
You can even make different lengths for one filter. | |
WARNING: You have to apply n_chain_end filter at the end of the n_chains. | |
Thanks to this the intial var can also be tupple. |
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
000000 Officially Xerox | |
000001 SuperLAN-2U | |
000002 BBN (was internal usage only, no longer used) | |
000003 XEROX CORPORATION | |
000004 XEROX CORPORATION | |
000005 XEROX CORPORATION | |
000006 XEROX CORPORATION | |
000007 XEROX CORPORATION | |
000008 XEROX CORPORATION | |
000009 powerpipes? |