Skip to content

Instantly share code, notes, and snippets.

View bymaximus's full-sized avatar

bymaximus

  • Seeking new dragons
  • Brazil, Cataguases / MG
View GitHub Profile
@bymaximus
bymaximus / torrc.examples.txt
Created February 20, 2025 03:17 — forked from 0x9090/torrc.examples.txt
torrc examples
This file is part of Whonix
Copyright (C) 2012 - 2014 Patrick Schleizer <[email protected]>
See the file COPYING for copying conditions.
**** Do NOT edit this file! ****
This file will show you examples you can copy and paste to /etc/tor/torrc
Additionally, you can read the official Tor Manual at:
https://www.torproject.org/docs/tor-manual.html.en
@bymaximus
bymaximus / unlock.js
Created February 20, 2025 02:51 — forked from Overmiind/unlock.js
Unblock dev tools
() => {
function isDevToolsScript() {
var stack = new Error().stack;
return stack.includes('devtool');
}
Date.prototype.originalGetTime = Date.prototype.getTime;
Date.prototype.getTime = function () {
if (!isDevToolsScript()) {
return this.originalGetTime();
@bymaximus
bymaximus / router.cfg
Created February 20, 2025 02:19 — forked from marfillaster/router.cfg
MikroTik RouterOS v7 dual DHCP WAN recursive failover w/ PCC load-balancing; and recursive ECMP
# feb/11/2022 11:00:55 by RouterOS 7.2rc3
# software id = 9QK9-C798
#
# model = RB5009UG+S+
# serial number = XXXXXXXXXX
/ip settings set allow-fast-path=no
/interface bridge add admin-mac=FF:FF:FF:FF:FF:FF auto-mac=no name=bridge
@bymaximus
bymaximus / router.cfg
Created February 20, 2025 02:19 — forked from oakwhiz/router.cfg
[For reference only] MikroTik RouterOS v7 dual DHCP WAN recursive failover w/ PCC load-balancing; and recursive ECMP
# jul/28/2022 00:34:21 by RouterOS 7.4rc2
# incomplete config, do not use directly
/ip firewall address-list
add address=192.168.88.0/24 list=local
add address=192.168.88.0/24 list=preferprimary
add address=1.2.3.0/24 list=localnet-primary
add address=4.5.6.0/24 list=localnet-backup
add address=9.9.9.10 list=reserved-main
add address=9.9.9.11 list=reserved-isp1
@bymaximus
bymaximus / swhmac.groovy
Created December 13, 2023 13:43 — forked from darraghoriordan/swhmac.groovy
Adding custom hmac auth to swagger ui
(function () {
$(function () {
/*I add the ui elements I need here. I thought it would be better put them in here at runtime rather than hard code them in the index.html in case the index.html from my version of swashbuckle is made obsolete in a future version of the package. */
var hmacAuthUi =
'
&lt;div class="input"&gt;&lt;label for="input_api_username"&gt;Api Username: &lt;/label&gt;&lt;input placeholder="Api Username" id="input_api_username" name="input_api_username" type="text" size="20"&gt;&lt;/div&gt;
' +
'
&lt;div class="input"&gt;&lt;label for="input_api_hmackey"&gt;Api Key: &lt;/label&gt;&lt;input placeholder="ApiKey" id="input_api_hmackey" name="input_api_hmackey" type="text" size="20"&gt;&lt;/div&gt;
@bymaximus
bymaximus / sql.md
Created October 16, 2023 04:26 — forked from anilahir/sql.md
MySQL transaction within stored procedure example

Create stored procedure :

DROP PROCEDURE IF EXISTS sp_delete_users_till_date;

DELIMITER //

CREATE PROCEDURE sp_delete_users_till_date(location_id INT, till_date DATE)
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <time.h>
#include <termios.h>
#include <sys/time.h>
#include <sys/timeb.h>
#include <sys/types.h>
@bymaximus
bymaximus / composer.json
Created May 19, 2019 02:52 — forked from mfurlend/composer.json
composer require git repository
{
"name": "my_vendor_name/my_package",
"description": "My Package Description",
"license": "GPL-3.0",
"autoload": {
"classmap": [ // search these directories for classes
"lib/"
]
},
"repositories": {
@bymaximus
bymaximus / nginx.conf
Created April 19, 2016 21:33 — forked from chrisallenlane/nginx.conf
This is an nginx configuration that does the following: - Implements a RESTful API using CORS between `example.com` and `api.example.com` - Uses SSL - Reverse-proxies SSL traffic from port 443 to a NodeJS application running on port 8000 Adapted from this page, with thanks to the original author: http://enable-cors.org/server_nginx.html
# Configure the reverse-proxy on port 443
server {
# general configs
keepalive_timeout 30;
listen 127.0.0.1:443 ssl;
server_name api.example.com;
# ssl configs
ssl_certificate /path/to/api.crt;
ssl_certificate_key /path/to/api.key;