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
| # this script counts the occurrences of different class names in input lines | |
| # where classes are specified using the HTML class attribute. | |
| # It then prints the top 10 most frequently occurring class names and their counts. | |
| BEGIN { | |
| FS=" class=" | |
| } |
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/awk -f | |
| ## Awk script to convert @apply directives in a CSS file to a list of sed commands | |
| BEGIN { RS = "}\n" } | |
| /@apply/ { | |
| # Extract the @apply directive name to the left of the left-curly-brace | |
| class_name = substr($0, index($0, ".") + 1, index($0, "{") - index($0, ".") - 1); | |
| # trim whitespace from ends | |
| gsub(/^[ \t\n]+|[ \t\n]+$/, "", class_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
| name: Publish Docker Image | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest |
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
| # # # | |
| # Manage alternate files by linking different versions to the canonical file name. | |
| # # # | |
| define safe-unlink-file | |
| @# File is not a link, so back-up | |
| @#$(or $(shell test -L $1 && echo 'TRUE'), $(call backup-file,$1)) | |
| @# File does not exist, or try to remove | |
| @#$(if $(shell (test -L $1 || test -e $1) && echo 'TRUE'), $(shell rm -f $1)) | |
| endef |
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
| -include service/${TASK}.conf | |
| ifdef STACK | |
| STACK := $(strip ${STACK}) | |
| STACK_NAME := $(shell echo "${STACK}" | tr A-Z a-z) | |
| STACK_ID := $(shell echo "${STACK}" | tr a-z A-Z) | |
| include stack/${STACK_NAME}.conf | |
| endif | |
| ifdef ${STACK_ID}_STACK |
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
| # bring up the ssh tunnel without requiring leaving a terminal open | |
| # by opening a connection without a shell with the -N option. | |
| # nohup helps to keep open the connection. | |
| # provide an optional log, which might help troubleshooting. | |
| # combine stderr and stdout( 2>&1 ) | |
| # send to background ( & ) | |
| connect() { | |
| nohup ssh tunnel -N > ~/.tunnel.log 2>&1 & | |
| } |
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
| BEGIN { | |
| patch_file = "ERR" # initialize | |
| patches = "patches" # dir to output patches | |
| if (ENVIRON["PATCH_DIR"]) { | |
| patches = ENVIRON["PATCH_DIR"] | |
| } | |
| system("test -d " patches " || mkdir -p " patches) | |
| } |
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
| # # # | |
| # Looks for ${PROJ_ROOT}conf/ssh_config. | |
| # Export PROJ_ROOT or SSH_CONFIG | |
| # | |
| # Minimal orchestration through filtering of HOST_LIST | |
| # by a prefix/suffix in ssh Host aliases specified in ENV. | |
| # Defaults to 'stage' | |
| # | |
| # Targets with 'all-' prefix execute commands against all |
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/bash | |
| gitsubs() { | |
| gitsubs_max_depth=12 | |
| echo searching for git repos | |
| echo directory max-depth = $gitsubs_max_depth | |
| echo executing git $@ | |
| ( # use a subshell and change the field-separator | |
| # to allow for spaces in filenames |
NewerOlder