Skip to content

Instantly share code, notes, and snippets.

View davidrhyswhite's full-sized avatar
💭
🚀

David Rhys White davidrhyswhite

💭
🚀
View GitHub Profile
@davidrhyswhite
davidrhyswhite / cucumber.thor
Created November 1, 2012 22:51
Running multiple cucumber tests in parallel
require 'rubygems'
require 'thor'
require 'parallel'
require 'cucumber'
require 'cucumber/cli/main'
require File.expand_path('./lib/thor/json_formatter')
require "bundler"
begin
Bundler.setup
rescue
class Api::UsersController < ApplicationController
def index
@users = User.all
render json: @users
end
def show
@user = User.find params[:id]
render json: @user
#!/usr/bin/env bash
sudo su - root
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
<!DOCTYPE HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>OpenLayers Labeled Features Example</title>
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css">
<link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?v=3&amp;sensor=false"></script>
externalid name
S12000024 Perth and Kinross
S12000006 Dumfries and Galloway
S12000021 North Ayrshire
S12000029 South Lanarkshire
S12000044 North Lanarkshire
S12000008 East Ayrshire
S12000042 Dundee City
S12000034 Aberdeenshire
S12000011 East Renfrewshire
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-input/paper-input.html">
<polymer-element name="datum-entity" attributes="fields">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
<link rel="import" href="../paper-input/paper-input.html">
<polymer-element name="my-element">
<template>
<style>
body {
background-color: rgb(240, 240, 240);
}
:host {
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@davidrhyswhite
davidrhyswhite / main.rs
Last active January 8, 2018 12:29
Simple TCP Server in Rust
use std::io::{TcpListener, TcpStream};
use std::io::{Acceptor, Listener};
use std::thread::Thread;
fn main() {
let mut acceptor = TcpListener::bind("127.0.0.1:3000").unwrap().listen().unwrap();
println!("Listening on 3000");
for stream in acceptor.incoming() {
match stream {
Err(_) => {}