Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Watkins twasink

View GitHub Profile
@twasink
twasink / AjaxErrorHandlingSpikeSpec.js
Created Sep 16, 2019
An attempt to explore how error handling in ExtJS AJAX requests work. Use ExtJS, Jasmine
View AjaxErrorHandlingSpikeSpec.js
/**
* An attempt to explore how error handling in ExtJS AJAX requests work,
* in particular looking at ways to re-try requests and cope with
* both the conventional 'success/fail/callback' style and this
* new-fangled 'then/always/otherwise' promise approach.
*/
describe("Twasink.spike.AjaxErrorHandlingSpikeSpec", function() {
var successHandler;
var failHandler;
var alwaysHandler;
@twasink
twasink / PublicSubnets.yaml
Created Jan 15, 2019
Example CloudFormation stack building two public subnets.
View PublicSubnets.yaml
---
AWSTemplateFormatVersion: '2010-09-09'
Description:
The Public Subnet, and associated routing information
# Metadata: # no metadata
Parameters:
Environment:
Type: String
@twasink
twasink / Globals.yaml
Created Jan 15, 2019
Baby's First CloudFormation Stack
View Globals.yaml
---
AWSTemplateFormatVersion: '2010-09-09'
Description:
Global configuration that could be used by multiple related stacks
# Metadata: # no metadata
Parameters:
Environment:
Type: String
@twasink
twasink / ClipboardOverride.js
Created Sep 21, 2016
An override to the default Grid Clipboard plugin for ExtJS, implementing somewhat more sensible behaviour
View ClipboardOverride.js
Ext.define('Twasink.override.Clipboard', {
override: 'Ext.grid.plugin.Clipboard',
// The default putCellData doesn't pay attention to the selection, or the editor. This is a fix
putCellData: function(data, format) {
var view = this.getCmp().getView();
// OVERRIDE Lines 141 to 157 in the ExtJS 6.2.0 source. This fixes a bug where the paste event starts where the
// navigation position is, which may well be at the bottom of the selection.
View publish_to_s3_Jenkinsfile
#!groovy
node {
// Need to replace the '%2F' used by Jenkins to deal with / in the path (e.g. story/...)
// because tests that do getResource will escape the % again, and the test files can't be found
ws("workspace/${env.JOB_NAME}/${env.BRANCH_NAME}".replace('%2F', '_')) {
// Mark the code checkout 'stage'....
stage 'Checkout'
checkout scm
// Mark the code build 'stage'....
View simple_Jenkinsfile
#!groovy
node {
// Need to replace the '%2F' used by Jenkins to deal with / in the path (e.g. story/...)
// because tests that do getResource will escape the % again, and the test files can't be found.
// See https://issues.jenkins-ci.org/browse/JENKINS-34564 for more.
ws("workspace/${env.JOB_NAME}/${env.BRANCH_NAME}".replace('%2F', '_')) {
// Mark the code checkout 'stage'....
stage 'Checkout'
checkout scm
View docker-compose.yml
data:
build: jenkins-data
master:
build: jenkins-master
volumes:
- .:/backup
volumes_from:
- data
ports:
View Dockerfile
FROM nginx:1.10
MAINTAINER Robert Watkins
RUN rm /etc/nginx/conf.d/default.conf
RUN rm /etc/nginx/nginx.conf
COPY conf/jenkins.conf /etc/nginx/conf.d/jenkins.conf
COPY conf/nginx.conf /etc/nginx/nginx.conf
@twasink
twasink / master_Dockerfile
Created Aug 1, 2016
A docker file for a Jenkins master server
View master_Dockerfile
FROM jenkins:2.7.1
MAINTAINER Robert Watkins
USER root
RUN mkdir /var/log/jenkins
RUN mkdir /var/cache/jenkins
RUN chown -R jenkins:jenkins /var/log/jenkins
RUN chown -R jenkins:jenkins /var/cache/jenkins
USER jenkins
@twasink
twasink / data_Dockerfile
Last active Feb 1, 2018
Dockerfile for a Jenkins data volume container
View data_Dockerfile
# Needs to match the linux version used in jenkins-master
FROM debian:jessie
MAINTAINER Robert Watkins
# user 1000 must match the user id for the jenkins user in jenkins-master
RUN useradd -d "/var/jenkins_home" -u 1000 -m -s /bin/bash jenkins
RUN mkdir -p /var/log/jenkins
RUN chown -R jenkins:jenkins /var/log/jenkins
You can’t perform that action at this time.