Each section should be run as the user or as root, pay attention to which one!
As $USER
curl https://nixos.org/nix/install | sh
--- | |
################################################################################ | |
## K8S Default Backend for Nginx if no endpoint is available e.g. 404 servers | |
############################################################################### | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: nginx-default-backend | |
namespace: kube-system | |
labels: |
#lang racket | |
;; hello world in Racket | |
;; comments begin with ; | |
;; some people like to use ;; | |
;; function application is done by surrounding the function name and arguments in parens | |
;; | |
;; if you have seen languages like Python or JavaScript, f(a,b,c) is (f a b c) in scheme | |
(displayln "Hello, world!") |
# Prefix and cycle | |
set-option -g prefix C-\\ | |
bind C-\ last-window | |
# Reload config | |
bind r source-file ~/.tmux.conf | |
# vi copy-mode | |
setw -g mode-keys vi |
= 1 | |
= + | |
= * + | |
= * | |
= | |
[ *( + )+ , | |
= * + , | |
= * + - , | |
, | |
= + , |
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF | |
| FUCKIN PUSSIES | |
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS | |
13:16 <luite> | hello | |
13:16 <ChongLi> | somebody has a mental illness! | |
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel | |
| compelled to write Node.js! | |
13:16 <genisage> | hi | |
13:16 <luite> | you might be pleased to learn that you can compile | |
| haskell to javascript now |
These are only examples, for a few very common actions. You are expected to write your own rules for the rest. The syntax is regular JavaScript, but see the polkit(8)
manpage for the object structure and available API. These examples are for polkit versions 106 and later, with the JS interpreter. They won't work with Debian's polkit v105.
If you don't know the action name, run pkaction
:
pkaction | grep cups
The possible results are YES
, AUTH_SELF(_KEEP)
, AUTH_ADMIN(_KEEP)
, NO
. Returning a result is final. Returning null
will continue checking other rules.
Put your rules in /etc/polkit-1/rules.d/*.rules
. (You can check everything in one giant addRule, or you can have a separate file and separate addRule for each program; it doesn't matter.)
These steps show two less common interactions with git to extract a single file which is inside a subfolder from a git repository. These steps essentially reduce the repository to just the desired files and should performed on a copy of the original repository (1.).
First the repository is reduced to just the subfolder containing the files in question using git filter-branch --subdirectory-filter
(2.) which is a useful step by itself if just a subfolder needs to be extracted. This step moves the desired files to the top level of the repository.
Finally all remaining files are listed using git ls
, the files to keep are removed from that using grep -v
and the resulting list is passed to git rm
which is invoked by git filter-branch --index-filter
(3.). A bit convoluted but it does the trick.
This is a local copy of the commands from: