A stored procedure that saves (insert/update) a URL, then returns the id for the record.
Works in Go v1.11.6+
and MySQL 5.7+
.
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE SaveUrl(
IN p_url varchar(8200),
IN p_title text
def paragraphs(document): | |
start = 0 | |
for token in document: | |
if token.is_space and token.text.count("\n") > 1: | |
yield document[start:token.i] | |
start = token.i | |
yield document[start:] |
A stored procedure that saves (insert/update) a URL, then returns the id for the record.
Works in Go v1.11.6+
and MySQL 5.7+
.
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE SaveUrl(
IN p_url varchar(8200),
IN p_title text
mkpoetryproj () | |
{ | |
if [ $# -eq 1 ]; then | |
poetry new "$1" | |
cd "$1" || exit | |
# get gitignore | |
curl https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore -o .gitignore | |
{ | |
echo "" | |
echo ".vscode/" |