Skip to content

Instantly share code, notes, and snippets.

View infomaven's full-sized avatar

Nadine Whitfield infomaven

  • Independent Software Developer
  • USA
View GitHub Profile
infomaven / CracklePop.scala
Last active May 12, 2024 18:55
Classic program that prints strings based on results of using MOD function against a List
Write a program that prints out the numbers 1 to 100 (inclusive).
If the number is divisible by 3, print Crackle instead of the number.
If it's divisible by 5, print Pop. If it's divisible by both 3 and 5,
print CracklePop. You can use any language.
/// any number x where x % y is divisible by that number. We'll use that fact to match boolean patterns in Scala.
//// In Scala RePL, copy-paste the function first. Then use the function in a second call from the REPL.
def listEval( number: Int ): String = (number % 3, number % 5 ) match {
infomaven /
Last active May 12, 2024 18:54
Java classes for FileFestivalPlanner project. Download all source files to same directory, compile and run from FestivalMain class.
import java.util.Collections;
import java.util.List;
* Created by nwhit8 on 11/1/15.
public class Day {
infomaven /
Last active May 5, 2024 23:51
Find difference between 2 CSV files & identify shared items. Diff report is printed to HTML.


  • Uses standard Python3 modules
  • Finds diff between 2 CSV files & prints results to HTML
  • Finds and prints list of items found in both files
  • Does NOT find duplicates in same file


  1. Download script file and sample CSVs to a directory on your computer
  2. Run script with this command>> python3
  • Script will generate html report in same directory
infomaven / gatlingGeneratedFeeder.scala
Last active January 29, 2023 17:57
Create a Gatling feeder file using REST calls
Basic blocks of code that will build a CSV file using repsonse data from API calls
This is a "one-off" process, meaning you will
1. run Gatling script to generate CSV file using REST calls (usually POSTS, but GETS or datbase queries could work )
2. copy the file into your project
3. compile and run Gatling
class MySimulation extends Simulation {
infomaven /
Created January 28, 2022 03:11 — forked from mdang/
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet


Create a new application

Install the Rails gem if you haven't done so before

infomaven / jsbin.uvecat.html
Last active May 7, 2021 12:40
JavaScript function that converts Hrs & Minutes into Decimal Hrs. It uses a Hash structure in Javascript to store the equivalencies. Intended audience: Use by Employees who need to enter Decimal time values for their time cards at work. Further down the line, this logic will be refactored into a Service that can be used programmatically by time-…
<!DOCTYPE html>
<script src=""></script>
<meta name="description" content="[add your bin description]" />
<meta charset=utf-8 />
<title>Decimalizer c.2013 - Nadine Whitfield</title>
infomaven / gargantuan_payload.scala
Last active February 14, 2020 17:19
Gatling payload generation using multiple rows from a Feeder file
package performance.simulations.scenarios
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import performance.simulations.lib.JenkinsParam._
import performance.simulations.lib.RandomFeeder._
import performance.simulations.lib.SharedHeaders._
* Created by nwhit8 on 9/21/15.
infomaven /
Last active June 18, 2017 23:19
yum install httpd -y
yum update -y
aws s3 cp s3://mywebbucket-cloudguru /var/www/html/ --recursive
service httpd start
chkconfig httpd on
infomaven / JS-questions.txt
Last active March 19, 2017 05:02
Technical questions
What is the difference between "express": "^4.13.3" and "express": "~4.13.3" ?
What happens if I use `npm install <package> --save` instead of `npm install <package> --save-dev` ?
infomaven / gist:783c39cbddaf65c5a4c261d9c9ab9ae0
Created December 20, 2016 18:58
String array manipulations
Take note of length - it is used as a String[] property > strings.length AND as a method for a String
array element > strings[i].length().
public Map<String, String> pairs(String[] strings) {
Map<String,String> map = new HashMap<String,String>();
for (int i = 0; i < strings.length; i++ ) {
if (strings[i].length() == 1 ) {
Character first = strings[i].charAt(0);