Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Loving SvelteJS

Antony Jones antony

:octocat:
Loving SvelteJS
View GitHub Profile
@pjbrown11
pjbrown11 / .gitlab-ci.yml
Created Jul 22, 2019
Example of Cypress running end to end tests through Gitlab CI.
View .gitlab-ci.yml
image: node:latest
stages:
- test
- export
- deploy
cache:
paths:
- node_modules
View first.test.js
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 Jun 28, 2018
parity-alpine
View Dockerfile
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 May 21, 2022
What I Wish I'd Known About Equity Before Joining A Unicorn
View what-i-wish-id-known-about-equity-before-joining-a-unicorn.md

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 Oct 6, 2015
Longitude and latitude bounding box around the UK
View uk-bounding-box.geojson
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 Jul 18, 2019
Chance.js Java integration is quite easy
View App.java
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 May 18, 2022
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

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 Feb 14, 2013
Print Gradle test results to console
View build.gradle
/*
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 Apr 10, 2022
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
View baseConverter.js
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@banksean
banksean / mersenne-twister.js
Created Feb 10, 2010
a Mersenne Twister implementation in javascript. Makes up for Math.random() not letting you specify a seed value.
View mersenne-twister.js
/*
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();