Skip to content

Instantly share code, notes, and snippets.

View meskarune's full-sized avatar
Halfway back to productivity

Dolores Portalatin meskarune

Halfway back to productivity
View GitHub Profile
@meskarune
meskarune / Freenode ssl weechat
Created August 28, 2012 15:24
IRC ssl errors
11:22 | gnutls: connected using 1024-bit Diffie-Hellman shared secret exchange
11:22 =!= | gnutls: peer's certificate is NOT trusted
11:22 =!= | gnutls: peer's certificate issuer is unknown
11:22 | gnutls: receiving 2 certificates
11:22 | - certificate[1] info:
11:22 | - subject `OU=Domain Control Validated,OU=Gandi Standard Wildcard SSL,CN=*.freenode.net', issuer `C=FR,O=GANDI SAS,CN=Gandi Standard SSL CA', RSA key 2048
| bits, signed using RSA-SHA1, activated `2012-01-15 00:00:00 UTC', expires `2013-01-14 23:59:59 UTC', SHA-1 fingerprint
| `cd1dc6658dd3905ad5735676879aeebd69ce75f2'
11:22 | - certificate[2] info:
11:22 | - subject `C=FR,O=GANDI SAS,CN=Gandi Standard SSL CA', issuer `C=US,ST=UT,L=Salt Lake City,O=The USERTRUST
@meskarune
meskarune / irc.conf
Created August 28, 2012 15:37
weechat yay
freenode.addresses = "chat.freenode.net/7000"
freenode.proxy
freenode.ipv6
freenode.ssl = on
freenode.ssl_cert= "/home/meskarune/.weechat/ssl-cert/GandiStandardSSLCA.crt"
freenode.ssl_priorities
freenode.ssl_dhkey_size = 1024
freenode.ssl_verify
freenode.password
freenode.capabilities
@meskarune
meskarune / wat
Created August 31, 2012 16:18
systemd vs v
:: systemd-sysvcompat and sysvinit are in conflict. Remove sysvinit? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: initscripts: requires sysvinit
@meskarune
meskarune / Munin Service File
Created September 7, 2012 12:27
/usr/lib/systemd/system
[Unit]
Description=Munin Node Server.
After=syslog.target network.target
[Service]
Type=forking
PIDFile=/var/run/munin/munin-node.pid
ExecStart=/usr/sbin/munin-node
[Install]
@meskarune
meskarune / gunicorn_lighttpd.conf
Created September 7, 2012 13:54 — forked from thomasbilk/gunicorn_lighttpd.conf
gunicorn lighttpd conf file
server.modules = (
"mod_access",
"mod_alias",
"mod_accesslog",
"mod_extforward",
"mod_rewrite",
#"mod_fastcgi",
"mod_proxy",
"mod_redirect" )
@meskarune
meskarune / sed replace
Created September 12, 2012 00:15
replace string in a file with info from another file
sed -i.bac '/@post/ {
s/@post//g
r posts.html
}' template.html
@meskarune
meskarune / html includes
Created September 12, 2012 00:27
Include one html file in another
#PHP include one html file in another
1. Save the HTML for the common elements of your site to separate files. For example, your navigation section might be saved as navigation.html or navigation.php.
2. Use the following PHP code to include that HTML in each page.
<?php
require($DOCUMENT_ROOT . "path to file/include-file.html");
?>
3. Use that same code on every page that you want to include the file.
@meskarune
meskarune / grep man
Created September 12, 2012 23:25
Regular expressions
A regular expression may be followed by one of several repetition operators:
? The preceding item is optional and matched at most once.
* The preceding item will be matched zero or more times.
+ The preceding item will be matched one or more times.
{n} The preceding item is matched exactly n times.
{n,} The preceding item is matched n or more times.
{,m} The preceding item is matched at most m times.
{n,m} The preceding item is matched at least n times, but not more than m times.
@meskarune
meskarune / autostart
Created October 7, 2012 20:24
herbstluftwm config
#!/bin/bash
# this is a simple config for herbstluftwm
function hc() {
herbstclient "$@"
}
hc emit_hook reload
@meskarune
meskarune / journalctl netcfg
Created October 19, 2012 14:03
journalctl netcfg not bringing up eth0 at boot
** Oct 19 09:01:57 localhost systemd[1]: iptables.service: main process exited, code=exited, status=1
** Oct 19 09:01:57 localhost iptables-restore[1886]: Can't open /etc/iptables/iptables.rules: No such file or directory
** Oct 19 09:01:57 localhost systemd[1]: Failed to start Packet Filtering Framework.
Oct 19 09:01:57 localhost systemd[1]: Unit iptables.service entered failed state.
Oct 19 09:01:57 localhost systemd[1]: Started Login Service.
Oct 19 09:01:57 localhost systemd-logind[1890]: New seat seat0.
Oct 19 09:01:58 localhost sshd[1887]: Server listening on 0.0.0.0 port 22.
Oct 19 09:01:58 localhost sshd[1887]: Server listening on :: port 22.
** Oct 19 09:02:01 localhost netcfg[1888]: :: main up Duplicate Address Detection is taking too long
** Oct 19 09:02:01 localhost netcfg[1888]: [fail]