Skip to content

Instantly share code, notes, and snippets.

View sjbodzo's full-sized avatar
✝️

Jess Bodzo sjbodzo

✝️
  • FL
View GitHub Profile
@sjbodzo
sjbodzo / cppNumVars.cpp
Created October 16, 2013 03:46
Website Code Fragment #1 - numerical variable type examples in C++
int x = 135; //stores the value 135 in an int variable named x
float y = 13.5f; //stores the float value 13.5 in a float variable named x
float z = 1.39e22; //stores the float value 1.39*10^22 in a float variable named z
long double a = 1.2345L; //stores the long double value 1.2345
@sjbodzo
sjbodzo / SimpleRegexPractice.java
Created November 13, 2013 19:57
simple regex practice
class RegexUtility {
public static String[] matches(String pattern, String[] words) {
String s = pattern;
for (int i = 0; i < words.length; i++) {
if (!(words[i].matches(pattern))) words[i] = null;
}
return words;
}
}
@sjbodzo
sjbodzo / gist:39fe9edce27b10b7203d
Created April 17, 2015 01:54
Dijkstra's For Node Mapping Calculation.java
import java.util.PriorityQueue;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.List;
import java.io.*;
class Edge {
public Node dest_node; // Destination when you travel along this node
public int distance; // How far to get to destination node along this edge
@sjbodzo
sjbodzo / brother.inr
Created April 25, 2015 15:53
Brother EM630 Typewriter Sketch
#include <SD.h>
File tweet_file;
int NUM_TWEETS = 800;
// Pin assignments for Arduino pins to control select lines.
// Note : Mux A takes lines coming from T/W into breadboard.
// Demux B takes line coming from Mux A and demuxes it.
// Demux C handles last two remaining lines not gotten by B.
@sjbodzo
sjbodzo / wep_64.swift
Created January 8, 2016 16:44
WEP 64 Bit Key Generation
// Created by: Jess Bodzo
// The code below is a simple WEP key generator based off a given passphrase
import UIKit
import Foundation
var psk = "password"
let m = UInt(1 << 32)
let c = UInt(0x269ec3)
let a = UInt(0x343fd)
@sjbodzo
sjbodzo / wep_md5.swift
Last active January 12, 2016 21:01
128 bit WEP key generation written natively in Swift, using an MD5 hash under the hood.
//: Wifi Encryption For 128 Bit WEP key generation using an MD5 hash
// Created by: Jess Bodzo
/**
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@sjbodzo
sjbodzo / wep_md5.swift
Created January 12, 2016 13:32
128 bit WEP key generation written natively in Swift, using an MD5 hash under the hood.
//: Wifi Encryption Scheme for generating a 128 bit WEP key
import UIKit
import Foundation
var psk = "meterking1"
// MD5 Implementation
/** Circular Shift implementation for 32 bit unsigned integers **/
protocol CircularShiftable {
### Keybase proof
I hereby claim:
* I am sjbodzo on github.
* I am crispy_ (https://keybase.io/crispy_) on keybase.
* I have a public key ASDlR6rHaJhIyXF7JXxGOK7pcTncLNPE5iHyeciS91FGPgo
To claim this, I am signing this object:
@sjbodzo
sjbodzo / gist:759ac4d44f2dd71cfb916ba16503802f
Created July 7, 2020 14:53
Terraform AzureRM Key Vault Secret - Property Value Bug
{"error":{"code":"BadParameter","message":"Property has invalid value\r\n"}}
@sjbodzo
sjbodzo / bounce.py
Created September 16, 2020 21:40
Sample snippet to delete/re-add a module
import pyterprise
import argparse
import pathlib
parser = argparse.ArgumentParser(description='Parse Arguments')
parser.add_argument('-n', '--hostname',
required=True,
type=str,
action='store',
help="FQDN for the TFE cluster")