This file contains 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
/* | |
* | |
* █████╗ ██╗ ██╗ ██╗ █████╗ ██╗ ██╗███████╗ ██████╗ ███╗ ██╗ ██╗██████╗ ██████╗ | |
* ██╔══██╗██║ ██║ ██║██╔══██╗╚██╗ ██╔╝██╔════╝██╔═══██╗████╗ ██║██╗██╗██║██╔══██╗██╔════╝ | |
* ███████║██║ ██║ █╗ ██║███████║ ╚████╔╝ ███████╗██║ ██║██╔██╗ ██║╚═╝╚═╝██║██████╔╝██║ | |
* ██╔══██║██║ ██║███╗██║██╔══██║ ╚██╔╝ ╚════██║██║ ██║██║╚██╗██║██╗██╗██║██╔══██╗██║ | |
* ██║ ██║███████╗╚███╔███╔╝██║ ██║ ██║ ███████║╚██████╔╝██║ ╚████║╚═╝╚═╝██║██║ ██║╚██████╗ | |
* ╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ | |
* | |
* |
This file contains 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 | |
# Purpose: Dumps a PostgreSQL database and uploads it via SFTP to another host. | |
# Author: Michael Hohl <[email protected]> | |
# ----------------------------------------------------------------------------- | |
display_usage() { | |
echo "Usage: $0 <dbname> <user@stfp-target>" | |
} | |
if [ $# -ne 2 ]; then |
This file contains 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
// ... | |
lazy val prefix: Parser[Prefix] = | |
(host | nick) ~ opt('!' ~> user) ~ opt('@' ~> host) ^^ { | |
case t ~ u ~ s => Prefix(t, u, s) | |
} | |
lazy val host = """[a-zA-Z0-9.:\-^_\-\[\]\\/`]+""".r | |
lazy val nick = """(\p{L}|[0-9]|[-_\[\]\\`^\{\}\|])+""".r | |
lazy val user = """[^(\s|@)]+""".r |
This file contains 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
package hohl.irc | |
/* | |
<message> ::= [':' <prefix> <SPACE> ] <command> <params> <crlf> | |
<prefix> ::= <servername> | <nick> [ '!' <user> ] [ '@' <host> ] | |
<command> ::= <letter> { <letter> } | <number> <number> <number> | |
<SPACE> ::= ' ' { ' ' } | |
<params> ::= <SPACE> [ ':' <trailing> | <middle> <params> ] | |
<middle> ::= <Any *non-empty* sequence of octets not including SPACE or NUL or CR or LF, the first of which may not be ':'> | |
<trailing> ::= <Any, possibly *empty*, sequence of octets not including NUL or CR or LF> |
This file contains 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{HTTP_HOST} !^$ | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteCond %{HTTPS}s ^on(s)| | |
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301] | |
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.html\ HTTP |
This file contains 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
// | |
// rfc3339.swift | |
// Alwyzon for iPhone and iPad | |
// | |
import Foundation | |
/// Parse RFC 3339 date string to NSDate | |
/// | |
/// :param: rfc3339DateTimeString string with format "yyyy-MM-ddTHH:mm:ss.SSS" |
This file contains 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
import Core | |
/** | |
Defines the basic ability of a job queue to dispatch jobs on a queue. | |
ThreadQueue is designed as protocol to support further implementations like a ConcurrentQueue. | |
*/ | |
public protocol ThreadQueue { | |
func dispatch(_ function: @escaping () -> Void) | |
} |
This file contains 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
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin | |
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 | |
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | |
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" | |
sudo apt-get update |
This file contains 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
sudo dpkg -i </path/to/cudnn-runtime.deb> | |
sudo dpkg -i </path/to/cudnn-developer.deb> | |
# replace the parts between < and > with your real file paths |
This file contains 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
# Install Bazelisk. | |
sudo curl -Lo /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/v1.2.1/bazelisk-linux-amd64 | |
sudo chmod +x /usr/local/bin/bazel | |
# Verify Bazel installation | |
bazel version |
OlderNewer