Skip to content

Instantly share code, notes, and snippets.

View ediblecode's full-sized avatar

Ian Routledge ediblecode

View GitHub Profile
@ediblecode
ediblecode / unreleased.jql
Created September 20, 2017 07:58
Unreleased cards in Jira
fixVersion in unreleasedVersions() OR fixVersion is EMPTY
@ediblecode
ediblecode / open-sprints.jql
Created September 21, 2017 15:15
Get issues in open sprints in JIRA
sprint in openSprints()
@ediblecode
ediblecode / .bash_profile
Last active November 21, 2017 15:04
Set docker environment variables on shell start
# C:\Users\<username>\.bash_profile
# Run `touch ~/.bash_profile` if this is the first time
# See https://github.com/docker/machine/issues/1709#issuecomment-134768100
# Need environment variables each time a shell is opened
eval `docker-machine env default`
#export DOCKER_IP=$(docker-machine ip default)
# Regenerate certificates when network changes
alias rc='docker-machine regenerate-certs default -f'
@ediblecode
ediblecode / startup-logging.cs
Created March 6, 2018 11:06
Startup logging for dotnet core and NodeServices
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddLogging(builder =>
{
builder.AddConfiguration(Configuration.GetSection("Logging"))
.AddConsole()
.AddDebug();
});
@ediblecode
ediblecode / hamburger.svg
Last active July 20, 2018 07:35
Hamburger Icon SVG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ediblecode
ediblecode / web.config
Created October 10, 2018 20:54
Redirect to www and https
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect to www" stopProcessing="true">
<match url="(.*)" />
<conditions trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^(?!www\.)" />
</conditions>
@ediblecode
ediblecode / wdio.conf.js
Created October 28, 2018 21:13
Visual regression testing wdio.conf.js
const path = require("path"),
VisualRegressionCompare = require("wdio-visual-regression-service/compare");
const getScreenshotPath = (folder) => {
return (context) => {
const browserVersion = parseInt(/\d+/.exec(context.browser.version)[0]);
const filePathParts = [
__dirname,
"screenshots",
@ediblecode
ediblecode / nunjucks-compiler.js
Created November 2, 2018 13:33
Compiler for nunjucks templates when using Mocha
// Compiler for nunjucks templates when using Mocha, based on
// http://www.hammerlab.org/2015/02/14/testing-react-web-apps-with-mocha/
// and
// https://github.com/at0g/nunjucks-loader/blob/master/index.js.
// Similar to https://github.com/rotundasoftware/nunjucksify
//
// The reason is that templates are loaded with webpack via nunjucks-loader.
// By default Mocha would try and load the template as JS.
// This compiler intercepts the call to require the njk template and does the following:
// - Loads the nunjucks template
@ediblecode
ediblecode / .flowconfig
Created November 9, 2018 12:08
Ignore SCSS in Flow
[options]
module.name_mapper.extension='scss' -> '<PROJECT_ROOT>/SCSSFlowStub.js.flow'
@ediblecode
ediblecode / .flowconfig
Last active November 9, 2018 13:29
Monorepo (lerna) flow config for scoped packages
[options]
module.name_mapper='^@nice-digital\/nds-\([^\/]+\)$' -> '<PROJECT_ROOT>/packages/nds-\1/src/\1.js'
module.name_mapper='^@nice-digital\/nds-\([^\/]+\)\/lib\/\(.*\)$' -> '<PROJECT_ROOT>/packages/nds-\1/src/\2.js'