Skip to content

Instantly share code, notes, and snippets.

View antony's full-sized avatar
:octocat:
Loving SvelteJS

Antony Jones antony

:octocat:
Loving SvelteJS
View GitHub Profile
@pjbrown11
pjbrown11 / .gitlab-ci.yml
Created July 22, 2019 18:52
Example of Cypress running end to end tests through Gitlab CI.
image: node:latest
stages:
- test
- export
- deploy
cache:
paths:
- node_modules
import { describe, it } from 'mocha';
import { expect } from 'chai';
import Nav from '../../src/components/Nav.html';
import { getByText } from 'dom-testing-library';
describe('first test', () => {
it('should be testable', () => {
let nav = new Nav({
target: document.body
});
@andresilva
andresilva / Dockerfile
Last active June 28, 2018 16:06
parity-alpine
FROM alpine:3.7
WORKDIR /build
# install tools and dependencies
RUN apk add --no-cache gcc musl-dev openssl-dev pkgconfig g++ make curl \
eudev-dev rust cargo git file binutils libusb-dev \
linux-headers
# show backtraces
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active November 3, 2024 17:14
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@jeffreymorganio
jeffreymorganio / uk-bounding-box.geojson
Created October 6, 2015 08:53
Longitude and latitude bounding box around the UK
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@treo
treo / App.java
Last active July 18, 2019 18:31
Chance.js Java integration is quite easy
import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Random;
import java.util.function.Supplier;
public class App
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active November 2, 2024 06:45
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@orip
orip / build.gradle
Created February 14, 2013 09:52
Print Gradle test results to console
/*
Sample output:
> gradle test ruby-1.9.3-p194 testing_with_gradle 9179829 ✗
...
:test
Results: SUCCESS (84 tests, 74 successes, 0 failures, 10 skipped)
*/
test {
testLogging {
@faisalman
faisalman / baseConverter.js
Last active January 11, 2023 14:43
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <[email protected]>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@banksean
banksean / mersenne-twister.js
Created February 10, 2010 16:24
a Mersenne Twister implementation in javascript. Makes up for Math.random() not letting you specify a seed value.
/*
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace
so it's better encapsulated. Now you can have multiple random number generators
and they won't stomp all over eachother's state.
If you want to use this as a substitute for Math.random(), use the random()
method like so:
var m = new MersenneTwister();