This file contains hidden or 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
| // ==UserScript== | |
| // @name GMail Diet | |
| // @namespace http://johnstanfield.com/ | |
| // @version 0.1 | |
| // @description deflates the ~3Q2018 GMail web app. The GMail web app prior to the version released around Q3 2018 was nice and compact. The new version has extra padding that is trimmed by this script. Tested in Tampermonkey on Chrome 56. | |
| // @author John Stanfield | |
| // @match *://mail.google.com/* | |
| // @grant none | |
| // ==/UserScript== |
This file contains hidden or 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
| <VirtualHost *:80> | |
| # suppose you have a SocketIO server running on port 8001 | |
| # the first request uses the HTTP protocol, and its response instructs the client to use WebSockets | |
| # subsequent requests are supposed to use the WebSocket protocol | |
| # this is one way to have an Apache proxy the requests to SocketIO | |
| # | |
| # not sure if this is suitable for production use | |
| # my production environment uses AWS Elastic Load Balancers, not Apache | |
| # my dev and pen-test environments do use Apache, and this is how I make them work | |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # backs up gitolite to s3 | |
| # SSH's into the gitolite host to list all repositories | |
| # then clones each repo | |
| # - on subsequent runs, it updates the repo rather than reclone (this is faster) | |
| # - todo: test what happens after a force push; perhaps rm -rf and reclone | |
| # then does a git bundle to turn the repo into a single-file backup | |
| # - todo: handle empty repos (or delete empty repos from gitolite) | |
| # then pushes the file to an S3 bucket |
This file contains hidden or 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
| <!-- add this to /var/ossec/etc/shared/agent.conf --> | |
| <localfile> | |
| <log_format>syslog</log_format> | |
| <location>/var/log/fail2ban.log</location> | |
| </localfile> |
This file contains hidden or 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
| # build an email | |
| mail = Mail.new do | |
| to 'to@example.com' | |
| from 'from@example.com' | |
| bcc ['asdf@example.com','foo@example.com','bar@example.com'] | |
| subject 'test email' | |
| end | |
| text_part = Mail::Part.new do | |
| body 'This is plain text' |
NewerOlder