Skip to content

Instantly share code, notes, and snippets.


JRichardsz jrichardsz

View GitHub Profile
jrichardsz / http request disection
Created February 2, 2023 20:04
http request disection
View http request disection
Articles exploring new technologies abound.
In this post, I want to go back to the basics and build a simple web server from scratch with NodeJS. In doing so, we will review the structure of HTTP requests and responses and get an introduction to Node's Stream API.
First, we will quickly review Node's built-in http module. Following that, we will study the general structure of an HTTP request and response. Then, using Node's built-in net module, we will create a low-level TCP server and try to make a usable web server out of it.
jrichardsz / error codes description
Last active February 3, 2023 00:10
ad ldap snippets
View error codes description
At first glance, those errors are returned by the LDAP Server and they're no specific code from SiteMinder.
80090308: LdapErr: DSID-0C09044E, comment AcceptSecurityContext error, data 52e, v2580
This error means the username is valid, but the password is not valid (1).
[6915/140245661083392][Mon Jan 04 2021 22:27:43][SmDsLdapProvider.cpp:1888][ERROR][sm-Ldap-00650] CSmDsLdapProvider::Search(): Wrong syntax of LDAP search filter (samAccountName=) 
jrichardsz / sample1.ldif
Last active February 1, 2023 19:40
ldif files for inmemory ldaps
View sample1.ldif
# source
dn: cn=MYCOMPANY Users,dc=mycompany,dc=com
changetype: add
objectClass: posixGroup
objectClass: top
gidNumber: 1001
dn: cn=jim smith,cn=MYCOMPANY Users,dc=mycompany,dc=com
View java unit test snippets - spring boot rest controller
jrichardsz / gist:825a0e7dbe08ac3b7d8011182e891be5
Created January 25, 2023 16:42 — forked from rxaviers/gist:7360908
emoji icon emoticon github markdown
View gist:825a0e7dbe08ac3b7d8011182e891be5


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
View html split panes - v1.html
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
body {
font-family: Arial;
color: white;
jrichardsz / corrupt blobs.html
Last active January 16, 2023 01:04
javascript camera sandbox snippets
View corrupt blobs.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
Blob from mediaRecorder.stop()<br />
<audio controls src="data:audio/webm;codecs=opus;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwH/////////FUmpZpkq17GDD0JATYCGQ2hyb21lV0GGQ2hyb21lFlSua7+uvdeBAXPFh7ckveqAiXGDgQKGhkFfT1BVU2Oik09wdXNIZWFkAQEAAIC7AAAAAADhjbWERzuAAJ+BAWJkgSAfQ7Z1Af/////////ngQCjQeiBAACA+4PeoH/Pz+viVaGI5AB0wvZhPSJoZMPIjAJBg2hZOWdyNnaSq4mDPctrSIt/O8nvtcmWeFIP+DrqmoTF5XPZYcIaRgsco7yunjDalb83DnxBago64n7Crj7Lj+Z2+RF5WjtPFN8oz0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKwqnQQaVKKmwd7f3LyZFt5SAiDu3uzM5m0cIBQFoVuP91swnfQnMcNxvUEsa7jSxTfbpOr7qRDBXRLTAFO8Uv/DSAzt/5dfxMf7w/bf02EnjtX9yng/TLFqxec6rtA1fS9Kc0ga38mSq68Beh7V4mgggFn9I+SKD//uOovwFG4V/7wUBypnsX2c8OlIUKlJ26R1fDU+mAAAADyqJ+MEI7w5dDlXVZgrkq0mL39h7SYdihM69niTKHsd9v6aQn3EkjnuBIodwYXjJqv/+CH9UiS5XrRu3OIulejYjD8n4a3dvnvk5dkXrO2C6KVwydmkhCNJhGH5FlEeJXltKEf5z4xA1fcNUDfad/s/zbIYqGBq
jrichardsz / Server.js
Last active January 12, 2023 17:40 — forked from harsh317/Server.js
comments code sample
View Server.js
const express = require("express");
const app = express();
const server = require("http").Server(app);
const { v4: uuidv4 } = require("uuid");
const io = require("")(server);
const { ExpressPeerServer } = require("peer");
const url = require("url");
const peerServer = ExpressPeerServer(server, { // Here we are actually defining our peer server that we want to host
debug: true,