Skip to content

Instantly share code, notes, and snippets.

View legmac's full-sized avatar
👋
we did it

legmac

👋
we did it
View GitHub Profile
@legmac
legmac / strongswan.md
Created September 14, 2025 16:58 — forked from Horat1us/strongswan.md
Configuring Site-to-Site IPSec VPN

Configuring Site-to-Site IPSec VPN on Ubuntu using Strongswan

Requirements

This instruction is tested on Ubuntu 22.04 LTS

Open ports

  • UDP 4500
  • UDP 500
  • Custom protocol 50
@legmac
legmac / index.js
Created November 15, 2024 14:40 — forked from IrakliDevelop/index.js
making soap request with node.js
const fs = require('fs');
const parser = require('fast-xml-parser');
const soapRequest = require('./soap');
const url = ''; // your SOAP service url
const headers = {
'Content-Type': 'text/xml;charset=UTF-8',
'soapAction': '', // SOAP Action url, if needed
@legmac
legmac / gist.md
Created September 27, 2024 16:51 — forked from DannyWhyte/gist.md
Cross-Platform AES-GCM-256 Encryption & Decryption using JAVA to encrypt and NODE to decrypt

This snippet is about cross-platform AES-GCM-256 encryption & decryption, Where payload is being encrypted using JAVA and decrypted using NODE

sample config :

{
    "masterKey": "sfcpnnjFG6dULJfo1BEGqczpfN0SmwZ6bgKO5FcDRfI=",
    "iterations": 2333,
    "keyLength": 32,

"digest": "sha512"

@legmac
legmac / index.html
Created July 26, 2024 17:36 — forked from tmichel/index.html
simple websocket example with golang
<html>
<head>
<title>WebSocket demo</title>
</head>
<body>
<div>
<form>
<label for="numberfield">Number</label>
<input type="text" id="numberfield" placeholder="12"/><br />
@legmac
legmac / proxy_info.txt
Created January 21, 2024 16:51 — forked from ericzon/proxy_info.txt
Example of Tiny proxy with Basic auth
brew install tinyproxy
tinyproxy -c /usr/local/etc/tinyproxy/tinyproxy.conf -d
Tests:
NO AUTH
curl -iv --noproxy "*" --location http://www.google.com
AUTH FAIL
@legmac
legmac / rethinkdb_cheat_sheet.MD
Created December 13, 2023 13:17 — forked from bradtraversy/rethinkdb_cheat_sheet.MD
RethinkDB Query Cheat Sheet

RethinkDB Cheat Sheet

Create database

r.dbCreate('mydb')

List databases

@legmac
legmac / LICENSE
Created June 27, 2023 18:21 — forked from jzacsh/LICENSE
fix annoying broken `aws s3 sync` content-type uploads
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
# Source: https://gist.github.com/fca66711eaf0440483eba42ee013311a
#####################################
# How to Apply GitOps to Everything #
# Combining Argo CD and Crossplane #
# https://youtu.be/yrj4lmScKHQ #
#####################################
# Referenced videos:
# - Argo CD - Applying GitOps Principles To Manage Production Environment In Kubernetes: https://youtu.be/vpWQeoaiRM4
@legmac
legmac / EditableTableFX.java
Created August 31, 2022 18:45 — forked from haisi/EditableTableFX.java
Editable JavaFX TableView with textfield, datepicker and dropdown menu
/*
* Just copy and paste the code.
*/
package editabletableview;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.format.FormatStyle;
import java.util.Date;