Skip to content

Instantly share code, notes, and snippets.

Loving SvelteJS

Antony Jones antony

Loving SvelteJS
View GitHub Profile
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
- test
- export
- deploy
- 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 / Dockerfile
Last active Jun 28, 2018
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 \
# show backtraces
yossorion /
Last active May 21, 2022
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 / 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 /
Last active Jul 18, 2019
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.util.Random;
import java.util.function.Supplier;
public class App
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 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 / 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 ✗
Results: SUCCESS (84 tests, 74 successes, 0 failures, 10 skipped)
test {
testLogging {
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
* Copyright 2012-2015, Faisalman <>
* Licensed under The MIT License
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();