mirror of
https://codeberg.org/mhwombat/nix-book.git
synced 2026-01-11 00:02:37 +08:00
initial commit
This commit is contained in:
parent
488af7abac
commit
db6fb2e69c
2 changed files with 14 additions and 0 deletions
3
source/shebangs/bash-with-nix-pkg/my-script.sh
Executable file
3
source/shebangs/bash-with-nix-pkg/my-script.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p cowsay
|
||||
cowsay "Pretty cool, huh?"
|
||||
11
source/shebangs/python-with-nix-pkg/my-script.sh
Executable file
11
source/shebangs/python-with-nix-pkg/my-script.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i python3 -p python3Packages.html-sanitizer
|
||||
|
||||
from html_sanitizer import Sanitizer
|
||||
sanitizer = Sanitizer() # default configuration
|
||||
|
||||
original='<span style="font-weight:bold">some text</span>'
|
||||
print('original: ', original)
|
||||
|
||||
sanitized=sanitizer.sanitize(original)
|
||||
print('sanitized: ', sanitized)
|
||||
Loading…
Add table
Add a link
Reference in a new issue