Let's say you want to host domains first.com and second.com.
Create folders for their files:
| package main | |
| import ( | |
| "database/sql" | |
| "strconv" | |
| "log" | |
| "net/http" | |
| "fmt" | |
| "bytes" | |
| "gopkg.in/gin-gonic/gin.v1" |
| /** | |
| * Lightweight script to detect whether the browser is running in Private mode. | |
| * @returns {Promise<boolean>} | |
| * | |
| * Live demo: | |
| * @see https://output.jsbin.com/tazuwif | |
| * | |
| * This snippet uses Promises. If you want to run it in old browsers, polyfill it: | |
| * @see https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js | |
| * |
| <div id="revive-responsive-top" style="display: block; text-align: center;"> | |
| <script type="text/javascript"> | |
| adUnit = document.getElementById("revive-responsive-top"); | |
| adWidth = adUnit.offsetWidth; | |
| if ( adWidth >= 728 ) { | |
| /* Leaderboard 728x90 */ | |
| adUnit.innerHTML = '<ins data-revive-zoneid="3" data-revive-id="4689b54ec658f530f3250f4124e7f1ea"></ins>'; | |
| } else { |
| #!/bin/bash | |
| export SEMVER_LAST_TAG=$(git describe --abbrev=0 --tags 2>/dev/null) | |
| export SEMVER_RELEASE_LEVEL=$(git log --oneline -1 --pretty=%B | cat | tr -d '\n' | cut -d "[" -f2 | cut -d "]" -f1) | |
| #curl -o /tmp/hub.tgz https://github.com/github/hub/releases/download/v2.2.9/hub-linux-arm64-2.2.9.tgz | |
| #tar -xvzf /tmp/hub.tgz -C /tmp | |
| if [ -z $SEMVER_LAST_TAG ]; then | |
| >&2 echo "No tags defined" |
| type FilterOperator = 'AND' | 'OR'; | |
| type FiltersBy<T> = { | |
| [K in keyof T]?: (value: T[K]) => boolean; | |
| }; | |
| /** | |
| * Factory function that creates a specialized function to filter | |
| * arrays, by validating all filters (AND operator), | |
| * or validating just one of the filters (OR operator). | |
| * @param operator Method to validate all filters: AND, OR |
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /Users/YOUR_USERNAME/Sites; | |
| access_log /Library/Logs/default.access.log main; | |
| location / { | |
| include /usr/local/etc/nginx/conf.d/php-fpm; | |
| } |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| #!/bin/bash | |
| # remove exited containers: | |
| docker ps --filter status=dead --filter status=exited -aq | xargs -r docker rm -v | |
| # remove unused images: | |
| docker images --no-trunc | grep '<none>' | awk '{ print $3 }' | xargs -r docker rmi | |
| # remove unused volumes: | |
| find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <( |
| var page = new WebPage(); | |
| //spoof it as opera mini, to get the mobile page working properly | |
| page.settings.userAgent = "Opera/9.80 (J2ME/MIDP; Opera Mini/6.5.26955/27.1407; U; en) Presto/2.8.119 Version/11.10"; | |
| function doLogin(){ | |
| page.evaluate(function(){ | |
| var frm = document.getElementById("login_form"); | |
| frm.elements["email"].value = "--enter-your-email--"; |