Skip to content

Instantly share code, notes, and snippets.

New Computer
- LastPass
- Obsidian
- Slack
- Arq
- Restore .ssh from backups
- Restore .gitconfig from backups
- Restore .vim and .vimrc from backups
- Restore .profile from backups
@bchavet
bchavet / gist:ac3c641c881bf1f40dbbe608fbee7ce2
Created February 6, 2018 18:37
Varinish + Apache + SSL
# Public-facing, redirects to HTTPS
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
CustomLog /var/log/apache2/www.example.com_access.log combined
ErrorLog /var/log/apache2/www.example.com_error.log
# Force HTTPS
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
.yj-selector-right-sidebar,
#column-one {
display: none !important;
}
#header-navigation,
#main-column,
#column-two {
width: 100% !important;
padding-left: 0 !important;
}
window.fluid.dockBadge = '';
function updateDockBadge() {
var count = 0;
var notifications = jQuery('.yj-notifications-indicator-count').html().replace(/.*\s([0-9]*)\s.*/, '$1');
if (notifications.length) count += parseInt(notifications);
var messages = jQuery('.unread-count').html().replace(/.*\s([0-9]*)\s.*/, '$1');
if (messages.length) count += parseInt(messages);
#!/usr/bin/perl
# Control variables.
# TODO: use command line options for these
%mysql = (
host => 'localhost',
username => 'debian-sys-maint',
password => 'fDTlEHJtMdPeku38',
);
@bchavet
bchavet / decoder.xml
Created August 29, 2013 19:48
OSSEC Asterisk Decoders and Rules
<decoder name="asterisk">
<program_name>^asterisk</program_name>
</decoder>
<decoder name="asterisk-hijacking">
<parent>asterisk</parent>
<prematch>^WARNING[\d+]: \S+ in \S+: Don't know </prematch>
<regex offset="after_prematch">^\S+ how to respond via '(\w+/\d.\d/\w+)'</regex>
<order>user</order>
</decoder>