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 main | |
import ( | |
"fmt" | |
"log" | |
"github.com/altid/client" | |
"github.com/altid/client/driver/gtk" | |
) | |
func init() { |
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
### Keybase proof | |
I hereby claim: | |
* I am halfwit on github. | |
* I am halfwit (https://keybase.io/halfwit) on keybase. | |
* I have a public key ASCqs9oAmZyC6KqH7ePmF4u7-Llp_5aNFQmFPFTofuuCpQo | |
To claim this, I am signing this object: |
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
Temp holder |
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
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:atom="http://www.w3.org/2005/Atom"> | |
<xsl:output method="text"/> | |
<xsl:template match="/atom:feed"> | |
<xsl:for-each select="atom:entry"> | |
<xsl:value-of select="atom:link/@href"/> | |
<xsl:text>	</xsl:text> | |
<xsl:value-of select="atom:title"/> | |
<xsl:text> </xsl:text> |
Table of Contents
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
from subprocess import Popen, PIPE | |
from time import sleep | |
# run the shell as a subprocess: | |
p = Popen(['python', 'shell.py'], | |
stdin = PIPE, stdout = PIPE, stderr = PIPE, shell = False) | |
# issue command: | |
p.stdin.write('command\n') | |
# let the shell output the result: | |
sleep(0.1) |
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.
-
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. Returningnull
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.)
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
FONTS Earnestly | |
Better Defaults for Freetype | |
Contents | |
Introduction ....................................................... 16 | |
Better Defaults .................................................... 43 |
From N1256: (See http://port70.net/~nsz/c/c99/n1256.html#J.2)
- A "shall" or "shall not" requirement that appears outside of a constraint is violated (clause 4).
- A nonempty source file does not end in a new-line character which is not immediately preceded by a backslash character or ends in a partial preprocessing token or comment (5.1.1.2).
- Token concatenation produces a character sequence matching the syntax of a universal character name (5.1.1.2).
- A program in a hosted environment does not define a function named
main
using one of the specified forms (5.1.2.2.1). - A character not in the basic source character set is encountered in a source file, except in an identifier, a character constant, a string literal, a header name, a comment, or a preprocessing token that is never converted to a token (5.2.1).
- An identifier, comment, string literal, character constant, or header name contains an invalid multibyte character or does not
NewerOlder