Skip to content

Instantly share code, notes, and snippets.

View nealeu's full-sized avatar

Neale Upstone nealeu

  • Wormhole Technology Ltd
  • Cambridge, UK
View GitHub Profile
@yanickrochon
yanickrochon / SignaturePad.jsx
Last active September 8, 2022 19:02
Material UI integration of react-signature-canvas (https://github.com/agilgur5/react-signature-canvas)
import React, { useEffect, useRef, useState } from 'react';
import PropType from 'prop-types';
import { makeStyles } from '@material-ui/core/styles';
import classNames from 'classnames';
import Fade from '@material-ui/core/Fade';
import FormControl from '@material-ui/core/FormControl';
import IconButton from '@material-ui/core/IconButton';
import InputLabel from '@material-ui/core/InputLabel';
Notification.requestPermission()
.then(() => new Notification("Welcome to ecco", {
body: "This is some body text"
}));
// See: https://developer.mozilla.org/en-US/docs/Web/API/Notification/Notification
@ziadoz
ziadoz / install.sh
Last active April 7, 2024 16:04
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
type Branded<T, U extends string> = T & { [Symbol.species]: U };
// if targeting ES5, change to:
// type Branded<T, U> = T & { ['Brand']: U };
// FOO
type FooId = Branded<number, 'FooId'>;
// BAR
type BarId = Branded<number, 'BarId'>;
@gsitgithub
gsitgithub / find-currupt-jars.txt
Created November 7, 2016 05:07
maven: Find corrupted jar files
run this in .m2 files
it lists all the corrupted jar files in the repository
find /home/me/.m2/repository/ -name "*jar" | xargs -L 1 zip -T | grep error | grep invalid
To resolve them , delete them first and re run the build or run
@dwilkie
dwilkie / docker-cheat-sheat.md
Last active January 18, 2024 10:56
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@caniszczyk
caniszczyk / git-pre-receive-hook.sh
Created October 31, 2011 13:17
A reasonable git pre-receive-hook
#!/bin/sh
#
# For each ref, validate the commit.
#
# - It disallows deleting branches without a /.
# - It disallows non fast-forward on branches without a /.
# - It disallows deleting tags without a /.
# - It disallows unannotated tags to be pushed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title>
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script>
<script type="text/javascript" charset="utf-8">
$(function () {
var extractToken = function(hash) {