This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tech:app:start [2019/03/23 17:50] rk4n3 |
tech:app:start [2021/10/17 13:46] (current) rk4n3 |
||
---|---|---|---|
Line 9: | Line 9: | ||
Decrypt:<code>gpg --decrypt filename</code> | Decrypt:<code>gpg --decrypt filename</code> | ||
List keys:<code>gpg --list-options "show-keyring" [--list-keys|--list-secret-keys]</code> | List keys:<code>gpg --list-options "show-keyring" [--list-keys|--list-secret-keys]</code> | ||
- | Create key:<code>gpg --gen-key</code> | + | Create key:<code>gpg --full-generate-key</code> |
Import keys:<code>gpg --import keyname_pub.asc | Import keys:<code>gpg --import keyname_pub.asc | ||
gpg --allow-secret-key-import --import keyname_sec.asc</code> | gpg --allow-secret-key-import --import keyname_sec.asc</code> | ||
Export keys:<code>gpg --output keyname_pub.asc --armor --export keyid | Export keys:<code>gpg --output keyname_pub.asc --armor --export keyid | ||
gpg --output keyname_sec.asc --armor --export-secret-key keyid</code> | gpg --output keyname_sec.asc --armor --export-secret-key keyid</code> | ||
+ | Delete keys:<code>gpg --delete-secret-keys XXKEYIDXX | ||
+ | gpg --delete-keys XXKEYIDXX</code> | ||
+ | Flush password cache:<code>echo RELOADAGENT | gpg-connect-agent</code> | ||
==== Vim ==== | ==== Vim ==== | ||
Line 70: | Line 73: | ||
==== Home page for libfprint ==== | ==== Home page for libfprint ==== | ||
[[https://www.freedesktop.org/wiki/Software/fprint]] | [[https://www.freedesktop.org/wiki/Software/fprint]] | ||
+ | |||
+ | ===== OpenSSL ===== | ||
+ | Here's a quick/easy self-signed SSL cert creation command: | ||
+ | <WRAP prewrap><code>openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 365 -nodes</code></WRAP> | ||
+ | Alternately, for a separate key & cert file: | ||
+ | <WRAP prewrap><code>openssl req -newkey rsa:2048 -nodes -keyout yourapp.key -x509 -days 365 -out yourapp.pem</code></WRAP> | ||
===== apache ===== | ===== apache ===== | ||
Line 80: | Line 89: | ||
openssl x509 -in mycert.pem >> newcert.pem</code> | openssl x509 -in mycert.pem >> newcert.pem</code> | ||
* On CentOS, put password-less PEM/OpenSSL cert file at ''/etc/pki/ssl/certs/localhost.pem'' | * On CentOS, put password-less PEM/OpenSSL cert file at ''/etc/pki/ssl/certs/localhost.pem'' | ||
+ | * If you need to re-create the key from the PEM:<code>openssl rsa -in mycert.pem -out mycert.key</code> | ||
* Restart apache | * Restart apache | ||
Line 192: | Line 202: | ||
... and then you would want to include that config file from the primary config file (''~lighttpd/etc/lighttpd.conf'') \\ ''include "lighttpd-hostname.conf"'' | ... and then you would want to include that config file from the primary config file (''~lighttpd/etc/lighttpd.conf'') \\ ''include "lighttpd-hostname.conf"'' | ||
- | |||
- | ==== SSL ==== | ||
- | Here's a quick/easy self-signed SSL cert creation command: | ||
- | <WRAP prewrap><code>openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 365 -nodes</code></WRAP> | ||
- | Alternately, for a separate key & cert file: | ||
- | <WRAP prewrap><code>openssl req -newkey rsa:2048 -nodes -keyout yourapp.key -x509 -days 365 -out yourapp.pem</code></WRAP> | ||
==== WordPress ==== | ==== WordPress ==== | ||
Line 211: | Line 215: | ||
------ | ------ | ||
===== Snippets ===== | ===== Snippets ===== | ||
+ | |||
+ | ==== rsyslog: custom log file ==== | ||
+ | Add something like this into a ''/etc/rsyslog.d/myprogram.conf'' file: | ||
+ | <code># Separate myprogram logging into its own file | ||
+ | if $programname == 'myprogram' then /var/log/myprogram.log | ||
+ | & stop</code> | ||
+ | ... then, something like ''logger -t myprogram "this is a log message"'' will get routed to the custom log file. \\ | ||
+ | PHP code to do the same:<code> | ||
+ | openlog( "myprogram", 0, LOG_LOCAL6); | ||
+ | syslog( LOG_NOTICE, "this is a log message"); | ||
+ | </code> | ||
+ | Also, don't forget to add the custom log to ''logrotate'' by populating a file like ''/etc/logrotate.d/myprogram'' with:<code> | ||
+ | /var/log/myprogram.log { | ||
+ | missingok | ||
+ | weekly | ||
+ | size 2G | ||
+ | copytruncate | ||
+ | rotate 12 | ||
+ | notifempty | ||
+ | }</code> | ||
==== Ardour, Hydrogen & Jack under Windows ==== | ==== Ardour, Hydrogen & Jack under Windows ==== | ||
Line 257: | Line 281: | ||
==== Sendmail ==== | ==== Sendmail ==== | ||
+ | A useful reference: [[https://www.ietf.org/rfc/rfc1912.txt|RFC 1912]] \\ | ||
+ | In particular, ''MX'' DNS records should not refer to ''CNAME'' records, only ''A'' records | ||
+ | |||
=== Forwarding EMail: === | === Forwarding EMail: === | ||
In order to forward mail using a ''.forward'' file, and when your home directory has to be group-writable, this ''sendmail'' option has to be specified in the configuration: | In order to forward mail using a ''.forward'' file, and when your home directory has to be group-writable, this ''sendmail'' option has to be specified in the configuration: | ||
Line 348: | Line 375: | ||
First, add a profile by launching firefox like: ''firefox --new-instance -P profilename'' \\ | First, add a profile by launching firefox like: ''firefox --new-instance -P profilename'' \\ | ||
... and add a profile to suit the app you want to run in the minimal window. \\ | ... and add a profile to suit the app you want to run in the minimal window. \\ | ||
+ | Open firefox using the profile, and go to ''about:config'' in the URL bar. \\ | ||
+ | Change the value of ''toolkit.legacyUserProfileCustomizations.stylesheets'' to true. \\ | ||
Then, populate file ''$HOME/.mozilla/firefox/<profileid>.<profilename>/chrome/userChrome.css'' with: \\ | Then, populate file ''$HOME/.mozilla/firefox/<profileid>.<profilename>/chrome/userChrome.css'' with: \\ | ||
<code> | <code> | ||
Line 359: | Line 388: | ||
* !important may be added to force override, but not necessary | * !important may be added to force override, but not necessary | ||
*/ | */ | ||
- | #TabsToolbar {visibility: collapse;} | + | #TabsToolbar {visibility: collapse; !important; } |
- | #navigator-toolbox {visibility: collapse;} | + | #navigator-toolbox {visibility: collapse; !important; } |
#content browser {margin-right: -14px; margin-bottom: -14px;} | #content browser {margin-right: -14px; margin-bottom: -14px;} | ||
</code> | </code> |