Skip to content

Instantly share code, notes, and snippets.

View Gregliest's full-sized avatar

Greg Lee Gregliest

View GitHub Profile
@Gregliest
Gregliest / PackageErrors.jl
Created July 3, 2021 03:19
A quick and dirty script to find broken links in the Julia package registry, and then find any dependencies on those repos
import Pkg
using GitHub
using CSV
using DataFrames
using Dates
# Don't commit this once you add your auth token!!
GITHUB_AUTH = "" # INSERT your Github auth token
myauth = GitHub.authenticate(GITHUB_AUTH)
path = "" # INSERT the local path to your clone of the JuliaRegistries/General repo
@Gregliest
Gregliest / junit-rspec.ruby
Last active April 24, 2017 14:35
A simple RSpec example
describe('Climber')
describe('hasRope')
context('given a Sterling Rope')
it('should have a rope')
...
end
end
context('given no rope')
it ('should not have a rope')
...
@Gregliest
Gregliest / junit-rspec.ruby
Created April 24, 2017 14:28
A simple RSpec example
describe('Climber')
context('given a Sterling Rope')
it('should have a rope')
...
end
end
context('given no rope')
it ('should not have a rope')
...
end
@Gregliest
Gregliest / blog-junit-climber.java
Created April 24, 2017 14:27
A simple vanilla JUnit example.
public class ClimberTest {
private climber;
@Before
void setup() {
climber = new Climber();
}
@Test
public void testHasRopeWithRope() {
climber.setRope(new SterlingRope());
@Gregliest
Gregliest / blog-junit-solution.java
Created April 24, 2017 14:00
Example, making JUnit read a little more like Rspec
// Describe: the TripRequest model
@RunWith(HierarchicalContextRunner.class)
public class TripRequestTest {
static Instant now;
static Instant past;
static Instant future;
TimeSlot timeSlotNow;
TimeSlot timeSlotPast;
TimeSlot timeSlotFuture;