To see messages from other users and the system as well as performing various log operations from a regular user add it to the group:
sudo usermod -aG systemd-journal $USER
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
[Unit] | |
Description=My service | |
[Service] | |
ExecStart=/usr/local/bin/my-service \ | |
-argument value \ | |
-otherargument othervalue | |
# Setuid/Setgid | |
User=nobody |
(defn- normalize-verison | |
[version] | |
(let [[x y z] (map read-string (clojure.string/split version #"\.")) | |
z (or z 0)] | |
(+ (* x 10000) (* y 100) z))) | |
(defn version-compare | |
[a b] | |
(let [left (normalize-verison a) | |
right (normalize-verison b)] |
$ telnet-ssl -z ssl imap.gmail.com 993 | |
Trying 173.194.222.109... | |
Connected to gmail-imap.l.google.com. | |
Escape character is '^]'. | |
* OK Gimap ready for requests from 193.201.216.169 z8mb75199760ljk | |
a1 LOGIN [email protected] my-password-here | |
* CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT LIST-EXTENDED LIST-STATUS LITERAL- SPECIAL-USE APPENDLIMIT=35651584 | |
a1 OK [email protected] authenticated (Success) | |
a2 LIST "" "*" | |
* LIST (\HasNoChildren) "/" "INBOX" |
package main | |
import ( | |
"fmt" | |
"golang.org/x/net/context" | |
cc "golang.org/x/oauth2/clientcredentials" | |
"io/ioutil" | |
"net/http" | |
"os" | |
) |
(require 'json) | |
(defvar owm/base-api-url "api.openweathermap.org") | |
(defvar owm/base-api-ver 2.5) | |
(defvar owm/api-key "PUT_API_KEY_HERE") | |
(defvar owm/default-scheme "https") | |
(defun owm/build-url (appid lat lon lang units) | |
(let* ((local (format "data/%s/weather" owm/base-api-ver)) |
;;; Directory Local Variables | |
;; For more information see (info "(emacs) Directory Variables") | |
((nil . ((indent-tabs-mode . t) | |
(fill-column . 80))) | |
(c-mode . ((c-file-style . "k&r") | |
(tab-width . 4) | |
(c-basic-offset . 4) | |
(flycheck-checker . c/c++-gcc) | |
(flycheck-disabled-checkers c/c++-clang) |
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
gpg --export --armor 1E0B5331219BEA88 > 1E0B5331219BEA88.pub.asc
gpg --export-secret-keys --armor 1E0B5331219BEA88 > 1E0B5331219BEA88.priv.asc
gpg --export-secret-subkeys --armor 1E0B5331219BEA88 > 1E0B5331219BEA88.sub_priv.asc
gpg --export-ownertrust > ownertrust.txt