- Boot the server into the 64bit Linux rescue system
- Run
installimage - Select Ubuntu 11.10 (oneiric) 64bit
- In the editor, where you have to set the disk partition sizes, search for following lines and remove them. The actual lines may vary if Hetzner changes anything.
This file contains hidden or 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
| Easy to use Maintenance page as a Cloudflare Worker. Once set up, you can enable it for unlimited pages in your CF account. Get rid of greedy subscriptions that charge you per domain. | |
| How to: | |
| 1. Go to Cloudflare Workers and create a new Worker (url is https://dash.cloudflare.com/<your-id>/workers/new) | |
| 2. paste the Code from above | |
| 3. Set an AUTH_KEY and AUTH_VALUE and the maintenancePageHtml (optionally) | |
| 4. deploy the worker | |
| 5. goto Cloudflare and choose a domain, click on the Workers section (url is https://dash.cloudflare.com/<your-id>/<domain>/workers) | |
| 6. click on "Add Route" and set the Route you want to enable the maintenance page for (typically <domain>/*) | |
| 7. choose your previously created worker from the dropdown |
You have to do 2 things in order to allow your container to access your host's postgresql database
- Make your postgresql listen to an external ip address
- Let this client ip (your docker container) access your postgresql database with a given user
Obs: By "Host" here I mean "the server where docker is running on".
Find your postgresql.conf (in case you don't know where it is)
$ sudo find / -type f -name postgresql.conf
This file contains hidden or 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
| ;;; iterm.el - Send text to a running iTerm instance | |
| (require 'pcase) | |
| (require 'thingatpt) | |
| ;; To match SublimeText's key binding: | |
| ;; (global-set-key (kbd "<C-return>") 'iterm-send-text) | |
| (defvar iterm-default-thing 'line | |
| "The \"thing\" to send if no region is active. |
This file contains hidden or 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
| // Proof-of-concept code of how to extend Spark listeners for custom monitoring of Spark metrics | |
| // When using this from the spark-shell, use the REPL command :paste and copy-paste the following code | |
| // Tested on Spark 2.1.0, March 2017 | |
| import org.apache.spark.scheduler._ | |
| import org.apache.log4j.LogManager | |
| val logger = LogManager.getLogger("CustomListener") | |
| class CustomListener extends SparkListener { | |
| override def onStageCompleted(stageCompleted: SparkListenerStageCompleted): Unit = { |
This file contains hidden or 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 | |
| # install the smartctl package first! (apt-get install smartctl) | |
| if sudo true | |
| then | |
| true | |
| else | |
| echo 'Root privileges required' |
This file contains hidden or 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
| <style> | |
| html * { | |
| background: rgba(255, 0, 0, .1); | |
| box-shadow: 0 0 0 1px red; | |
| } | |
| </style> |
This file contains hidden or 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
| HP provides a downloadable "driver" for Linux for the HP 107w printer but there are NO reasonable install instructions provided, and following the "obvious" install process did not get the printer working. | |
| The closest I found to HP install instuctions once I knew more is https://support.hp.com/in-en/document/c05588857 | |
| Since I found this annoying and wasted more time on getting this printer working under Linux, I'm sharing a summary of what did work (on Debian 10). | |
| 1. Download the driver file from https://support.hp.com/us-en/drivers/selfservice/hp-laser-100-printer-series/24494339/model/24494342 from under the "Basic Drivers" menu for when the OS is set to Linux. | |
| The current version now is: "HP Laser 100 and HP Color Laser 150 Printer series Print Driver V1.00.39:00.12 5.9 MB Mar 20, 2019" |
This file contains hidden or 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
| root@vmi465483:~# cat /etc/nginx/sites-enabled/dspace.conf | |
| server { | |
| server_name repositorio.unijuanpablo.edu.pe; | |
| root /var/www/html/; | |
| client_max_body_size 2000m; | |
| location / { | |
| return 301 http://repositorio.unijuanpablo.edu.pe/xmlui/; | |
| } |
This file contains hidden or 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
| # From https://sigterm.sh/2010/07/09/generating-a-dependency-graph-for-a-postgresql-database/ | |
| # Converted to Python3 | |
| # Add config fort dbport | |
| # Increase PNG Size | |
| # pylinting | |
| from optparse import OptionParser, OptionGroup | |
| import sys | |
| import psycopg2 |
NewerOlder