Skip to content

Instantly share code, notes, and snippets.

Avatar
🕴️
The Professional is equanimous.

Johnny Boursiquot jboursiquot

🕴️
The Professional is equanimous.
View GitHub Profile
@jboursiquot
jboursiquot / requirements.md
Last active Sep 23, 2020
BaltimoreGo Challenge: Build a Port Scanner
View requirements.md

Your challenge is to write a port scanner in Go that uses a worker pool to efficiently scan multiple ports concurrently. It should meet the following requirements:

  1. Accepts a range of ports to scan as an argument (e.g. ./portscan -ports 8080-9090)
  2. Accepts a number of workers to use for performing the scans (e.g. ./portscan -workers 100)
  3. Outputs <PORT> CLOSED for closed ports as they are discovered.
  4. Outputs <PORT> OPEN for open ports as they are discovered.
  5. Extra credit: How could you informed the user of your port scanner of the likely service running on the open ports? (e.g. 5432 is likely a PostgreSQL server)

Hints:

View mypackage.go
package mypackage
import (
"context"
"fmt"
"os"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/dynamodb"
@jboursiquot
jboursiquot / go to
Last active Sep 21, 2019
bit.ly/gobridge-practical-go-workshop
View go to
bit.ly/gobridge-practical-go-workshop
@jboursiquot
jboursiquot / BaltimoreGo-090319-Challenge.md
Last active Sep 3, 2019
Baltimore Go Challenge for September 3rd, 2019 Meeting: Consume Maryland's Road Closures
View BaltimoreGo-090319-Challenge.md

Challenge: Consume Maryland's Road Closures

The state of MD exposes road closure data for you to do with whatever you'd like. Today, you'd like to fetch it and save it locally in a relational database (maybe sqlite?).

Head over to the site to explore the data.

Your mission (and success criteria):

  1. Consume the JSON endpoint for that data: https://opendata.maryland.gov/resource/nigh-m2sg.json
  2. Successfully parse each "closure" including its lat/long data, timestamps, etc.
@jboursiquot
jboursiquot / boursiquotj-cca630-p3-vpc.yaml
Created Aug 29, 2019
CCA 630 Project 3 VPC CloudFormation template
View boursiquotj-cca630-p3-vpc.yaml
AWSTemplateFormatVersion: '2010-09-09'
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: "VPC Configuration"
Parameters:
- vpccidr
- publicacidr
@jboursiquot
jboursiquot / steps.md
Last active Apr 3, 2019
Setting yourself up to contribute to Open Source Go projects with Modules
View steps.md

Step 1: go get the project

$ go get github.com/GITHUB_USERNAME/GITHUB_PROJECT

Step 2: Fork the repo

  • Navigate to the project's GitHub page and fork it into your own account.
  • Clone the project locally.
View keybase.md

Keybase proof

I hereby claim:

  • I am jboursiquot on github.
  • I am jboursiquot (https://keybase.io/jboursiquot) on keybase.
  • I have a public key whose fingerprint is 2F5A D69A 2F81 7E34 3A9C 424D CD6F A8BE 87F7 0649

To claim this, I am signing this object:

View keybase.md

Please publicly post the following Gist, and name it keybase.md

Keybase proof

I hereby claim:

  • I am jboursiquot on github.
  • I am jboursiquot (https://keybase.io/jboursiquot) on keybase.
  • I have a public key ASDmOWpT1ggiUmnZeb52pnxbP3DEZh5pfFwDzBYpchU4Wgo
View red-vs-blue.md

Red vs Blue: HTTP Showdown

Red Team: Build a temperamental HTTP server

Your mission, should you choose to accept it, is to build an HTTP server in Go that behaves erratically. Yes, your job is to write an HTTP server that misbehaves by doing the following in a non-deterministic fashion:

  • Delays responses to clients randomly between 10 and 30 seconds sometimes
  • Randomly errors out with HTTP 5XX responses
  • Rate-limits client requests adaptively in real time (for example, a client that makes 10 consecutive requests within 500 ms of each other should get throttled and receive an HTTP 429 status code)
View depth-first-search.md

Depth-First Search

Given the following Node struct and a slice of optional children nodes, implement a DepthFirstSearch method on Node that uses a depth-first search algorithm (navigating the tree from left to right) to return a slice of all the child node Name attributes in the appropriate order.

type Node struct {
	Name     string
	Children []*Node
}