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
@nremond
nremond / gist:2972382
Created June 22, 2012 12:10
Account feeder
class AccountFeeder() extends com.excilys.ebi.gatling.core.feeder.Feeder {
import org.joda.time.DateTime
import scala.util.Random
private val RNG = new Random()
// random number in between [a...b]
def randInt(a:Int, b:Int) = RNG.nextInt(b-a) + a
def daysOfMonth(year:Int, month:Int) = new DateTime(year, month, 1, 0, 0, 0, 000).dayOfMonth().getMaximumValue()
@infomaven
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>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta name="description" content="[add your bin description]" />
<meta charset=utf-8 />
<title>Decimalizer c.2013 - Nadine Whitfield</title>
</head>
<body>
@thiagomgo
thiagomgo / lambda-curl.py
Created November 1, 2016 19:13
A simple lambda function written in python to execute a curl command
def lambda_handler(event, context):
import subprocess
result = subprocess.call("curl -I http://foo.bar", shell=True)
return result
@mburrows02
mburrows02 / CustomSimulation.scala
Last active April 18, 2023 23:23
Gatling simulation with dynamic scenarios and injection profiles
package test
import io.gatling.core.Predef._
import io.gatling.core.structure.PopulatedScenarioBuilder
import io.gatling.core.controller.inject.InjectionStep
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._
import scala.concurrent.duration._
import scala.collection.mutable.ArraySeq
import org.json.JSONArray;
import org.json.JSONObject;
@dnozay
dnozay / _Jenkins+Script+Console.md
Last active May 3, 2024 09:33
jenkins groovy scripts collection.