Here is what I do on my projects in jupyter notebook,
import sys
sys.path.append("../") # go to parent dir
from customFunctions import *
#!/bin/bash | |
# This script will stop the service, backup the data folder including | |
# the database, the attachments and keys of your vaultwarden installation. | |
# Only the last 14 backups will be kept. If you want to keep more or less, please | |
# adjust the time on the last line of the script | |
# for this script to work to work adjust the following 4 folders to your environment | |
# timestamp added to the backup filename e.g. 20220130-1325 | |
NOW=$(date +'%Y%m%d-%H%M') |
cat > /etc/apk/repositories << EOF; $(echo) | |
http://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/main | |
http://dl-cdn.alpinelinux.org/alpine/v$(cat /etc/alpine-release | cut -d'.' -f1,2)/community | |
EOF | |
apk update |
ORIGINAL BLOG POST https://www.atlassian.com/git/tutorials/dotfiles
Disclaimer: the title is slightly hyperbolic, there are other proven solutions to the problem. I do think the technique below is very elegant though.
Recently I read about this amazing technique in an Hacker News thread on people's solutions to store their dotfiles. User StreakyCobra
showed his elegant setup and ... It made so much sense! I am in the process of switching my own system to the same technique. The only pre-requisite is to install Git.
#!/bin/bash | |
# -------------------- | |
# place this file anywhere where it can be execute fromthe webhook.php file. | |
# make sure, you put the correct path to this file into the webhook.php | |
# webdirectory is a directory accessible via internet, but not the main websites directory | |
# .. ideally webdirectory is a access via subdomain | |
# -------------------- | |
# set PATH |
<?php | |
/** | |
* GitLab Web Hook | |
* See https://gitlab.com/kpobococ/gitlab-webhook | |
* | |
* This script should be placed within the web root of your desired deploy | |
* location. The GitLab repository should then be configured to call it for the | |
* "Push events" trigger via the Web Hooks settings page. | |
* | |
* Each time this script is called, it executes a hook shell script and logs all |
<html> | |
<head> | |
<style> | |
body { | |
font-family: Verdana, sans-serif; | |
margin: auto; | |
padding: 20px; | |
text-align: left; | |
background-color: #fff; |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
#!/bin/bash | |
urlcb="https://www.coolblue.nl/en/laptops/apple-macbook/apple-macbook-pro/13-inch-screen/processor:apple-m1-chip" | |
urlmm="https://www.mediamarkt.nl/nl/category/_apple-mac-755619.html?searchParams=%2FSearch.ff%3FfilterTabbedCategory%3Donlineshop%26filterCategoriesROOT%3DComputer%25C2%25A7MediaNLnlc482710%26filterCategoriesROOT%252FComputer%25C2%25A7MediaNLnlc482710%3DApple%2BMac%25C2%25A7MediaNLnlc755619%26filteravailability%3D1%26filterProcessormodel%3DApple%2BM1%26channel%3Dmmnlnl%26followSearch%3D9954%26disableTabbedCategory%3Dtrue%26navigation%3Dtrue&sort=&view=&page=" | |
text1=$'NEW MAC NEW MAC! Check the Website!\n\n' | |
countcb=`curl -s -L $urlcb | grep -c -E -i "alt=\"Apple .* MYD.{3}\/"` | |
countmm=`curl -s -L $urlmm | grep -c -E "name\":\"APPLE MacBook Pro.*M1"` |