Skip to content

Instantly share code, notes, and snippets.

@bteller
bteller / docker-compose.yml
Created July 20, 2018 15:36
Selenium Docker Compose
hub:
image: selenium/hub
ports:
- "4444:4444"
environment:
- GRID_MAX_SESSION=64
chrome1:
image: selenium/node-chrome
links:
function waitFor(thing, callback) {
var intervalId = setInterval(function() {
var things = thing.split(',');
var passed = true;
for (var i = 0; i++; i < things.length) {
if (window[things[i]] == undefined) {
passed = false;
break;
}
@bteller
bteller / dotnet-core-c9.md
Last active March 12, 2017 15:25
Installing dotnetcore on c9

I had to run the following:

sudo apt-get update
sudo apt-get install apt-transport-https
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update

sudo apt-get install dotnet-dev-1.0.1
@bteller
bteller / rails.md
Created February 17, 2017 18:12
If Rails doesn't reload on changes

If it isn't reloading everything, like validation, add this to ./config/environments/development.rb

config.reload_classes_only_on_change = false
@bteller
bteller / Dockerfile
Created February 17, 2017 13:55
Ruby on Rails in Docker
#Taken from https://robots.thoughtbot.com/rails-on-docker
FROM ruby:2.3
RUN apt-get update -qq && apt-get install -y build-essential
# for postgres
RUN apt-get install -y libpq-dev
# for nokogiri
RUN apt-get install -y libxml2-dev libxslt1-dev
@bteller
bteller / test-it-out.md
Created November 23, 2016 14:30
attempt for blogging

Should this be a thing

Kind of depends on code support perhaps.

var something = "there it is";

We shall see.

@bteller
bteller / elk-docker-compose.yml
Created November 23, 2016 14:27
Docker compose file for an ELK stack
elasticsearch:
image: elasticsearch
ports:
- "9200:9200"
kibana:
image: kibana
links:
- elasticsearch
ports:
<html>
<body>
<div class="container">
<div id="header">
<div id="column-1">My Wonderful Site</div>
<div id="column-2">Links Here</div>
<div id="column-3">Welcome to You!</div>
</div>
<div id="content">
And here is all my wonderful content.
<html>
<body>
<div class="container">
<div id="header">
<div id="column-1">My Wonderful Site</div>
<div id="column-2">Links Here</div>
<div id="column-3">Welcome to You!</div>
</div>
<div id="content">
And here is all my wonderful content.
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FakeDatabase