Skip to content

Instantly share code, notes, and snippets.

@jbrazio
jbrazio / README.md
Last active May 17, 2024 10:55
Home Assistant and Freqtrade

Home Assistant and Freqtrade

This gist contains all the configuration files you will need to have something like this on your HASS dashboard.

Preview

This is an example configuration to get you started. It assumes you use a split configuration in Home Assistant. I like to have a entities folder on root and then inside I have a folder for each entity type (binary, cover, light, switch, sensor, etc) but you may adapt to your own configuration style.

In the configuration.yaml file make sure that you have something like this:

Best setup for fail2ban for hosts with ssh and apache
Jails (monitored services):
- apache - Blocks failed login attempts use the below jail
- apache-overflows - Blocks the remote host that is trying to request suspicious URLs, use the below jail
- apache-noscript - Block the remote host that is trying to search for scripts on the website to execute, use the below jail
- apache-badbots - Block the remote host that is trying to request malicious bot, use below jail
- http-get-dos - Stops DOS attack from remote host
- ssh - Blocks failed login attempts on the SSH server
@jiankaiwang
jiankaiwang / recaptcha-example-js.html
Last active December 16, 2024 03:26
the example to use recaptcha in javascript
<!--
Description: The following is the example code to use recaptcha.
Notice: The function backend_API_challenge is the concept and you should implement it on the backend.
Especially, you must keep your secret key in private all the time.
Flow:
1. Click the submit button.
2. On the console, execute backend_API_challenge function.
-->
<html>
<head>
@mscdex
mscdex / _instructions.md
Last active July 2, 2022 20:10
ssh shell session from the browser

Instructions:

  1. npm install express faye-websocket ssh2 term.js
  2. Create a public subdirectory
  3. Place client.htm in public
  4. Edit the ssh connection details in server.js. See the documentation for the connect() method in the ssh2 readme for more information.
  5. Start the server with node server.js
  6. Visit http://localhost:8000/client.htm in a WebSocket-capable browser