Guys, I’m far from a regex expert. Where should I start if I want to convert my file with text like
This is a text
to
<span id="f001">This</span><span id="f002"> is</span><span id="f003"> a</span><span id="f004"> text</span>
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 | |
# | |
# Bash script for checking what installed packages in a virtualenv needs updates | |
# | |
# Requires: | |
# - OSX | |
# - core-utils installed (brew install core-utils) | |
# - pypi-cli installed (pip install pypi-cli) | |
# | |
# Example output: |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
creationTimestamp: null | |
labels: | |
component: apiserver | |
provider: kubernetes | |
name: kubernetes | |
selfLink: /api/v1/namespaces//services/kubernetes | |
spec: |
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 | |
# | |
# Print out commands for uninstalling old Python 2.7, PyPy, 3.x versions, | |
# and installing the latest versions. | |
# | |
# Currently does 2.7, PyPy, 3.3, 3.4, 3.5, and 3.6. | |
# pyenv uninstall -f 2.7.13 | |
# pyenv uninstall -f 3.3.6 | |
# pyenv uninstall -f 3.4.6 | |
# pyenv uninstall -f 3.5.3 |
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
#!/bin/bash | |
# | |
# Remove all files with a certain extension and add them to git-lfs | |
# | |
# Install git-lfs on OSX with `brew install git-lfs` | |
set -eu | |
set -o pipefail | |
EXT=$1 |
gcloud config configurations
was added to gcloud
CLI in version 0.9.79 (2015/09/23)
(You probably don't need the [app]
section)
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
#!/bin/bash | |
set -efxu | |
cd "$(dirname "$0")/.." | |
if [ ! -f requirements-to-freeze.txt ]; then | |
echo "No requirements to freeze file found!" | |
exit 1 | |
fi |
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
""" | |
DJANGO | |
""" | |
from django.http import JsonResponse | |
def simple(request): | |
return JsonResponse({'health': 'OK'}) |
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 python | |
import matplotlib.pyplot as plt | |
import math | |
import random | |
data = [random.randint(10,100) for i in range(0,100)] | |
class Analysis(object): |