This file contains 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
package main | |
import ( | |
"crypto/tls" | |
b64 "encoding/base64" | |
"fmt" | |
"io" | |
"net/http" | |
"github.com/Azure/go-ntlmssp" |
This file contains 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
package main | |
import ( | |
"fmt" | |
"strings" | |
"unicode" | |
"github.com/go-ldap/ldap/v3" | |
auth "github.com/korylprince/go-ad-auth/v3" | |
) |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { | |
display: flex; | |
min-height: 98vh; |
This file contains 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
<!DOCTYPE html> | |
<html lang="en-GB"> | |
<head> | |
<meta charset="utf-8"> | |
<title>SVG Email Protection</title> | |
<style> | |
.svg-email-protection { | |
width: 180px; |
This file contains 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
//purpose: use random numbers from 1 to 6 (dice) to simulate normal distribution in js, only for educational purposes | |
//author: jr | |
//date: 27.11.2023 | |
const min = 1, max = 6; | |
let getRand = (countRand = 1) => { | |
let sumRand = 0; | |
for (let i = 0; i < countRand; i++) | |
sumRand += Math.floor(Math.random() * (max - min + 1)) + min; |
This file contains 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
// date: 16.11.2023 | |
// file: convert typescript to javascript with esbuild | |
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/evanw/esbuild/pkg/api" | |
) |
This file contains 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
//07.11.2023 | |
// Factorial function | |
const fact = (x) => (x == 0 ? 1 : x * fact(x - 1)); | |
// binomial coefficient where a is the total set of posibbilites and b is the number of combinatios we're interested in | |
const bincoeff = (a, b) => fact(a) / (fact(a - b) * fact(b)); | |
//hipergeometric function | |
const hipergeo = (M, N, n, k) => (bincoeff(M, k) * bincoeff(N - M, n - k)) / bincoeff(N, n); |
This file contains 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
package main | |
import ( | |
"fmt" | |
"os" | |
"strconv" | |
"golang.org/x/net/context" | |
"golang.org/x/oauth2/google" | |
sheet "gopkg.in/Iwark/spreadsheet.v2" |
This file contains 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
package main | |
// 20220914, jr | |
import ( | |
"C" | |
"context" | |
"fmt" | |
"net" | |
"os" |
This file contains 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
//shows example embedding of a sqlite database in a Go binary (go 1.19/modernc.org/sqlite, v1.18.1) | |
package main | |
import ( | |
"database/sql" | |
"embed" | |
"fmt" | |
"log" |
NewerOlder