Skip to content

Instantly share code, notes, and snippets.

require "selenium-webdriver"
require "capybara"
Capybara.register_driver :containerized_selenium do |app|
Capybara::Selenium::Driver.new(
app,
browser: :remote,
url: "http://selenium:4444/wd/hub",
desired_capabilities: Selenium::WebDriver::Remote::Capabilities.firefox
)
I'm working on a way to connect data to a user interface
in a way that is flexible,
yet still easy for end-users to work with.
This has been one of the biggest challenges for me.
## References:
* https://hackernoon.com/how-to-decouple-state-and-ui-a-k-a-you-dont-need-componentwillmount-cc90b787aa37
* https://webpack.js.org/guides/code-splitting/
Started POST "/evaluate" for 127.0.0.1 at 2018-06-23 03:01:41 -0400
Started POST "/evaluate" for 127.0.0.1 at 2018-06-23 03:01:41 -0400
Started POST "/evaluate" for 127.0.0.1 at 2018-06-23 03:01:41 -0400
Started POST "/evaluate" for 127.0.0.1 at 2018-06-23 03:01:41 -0400
Started POST "/evaluate" for 127.0.0.1 at 2018-06-23 03:01:41 -0400
Processing by CodeController#evaluate as */*
Parameters: {"system"=>"slim", "code"=>"\n select * from samples\n where status = 'Received'\n and partno in (select distinct partno from specification)\n "}
Processing by CodeController#evaluate as */*
Parameters: {"system"=>"slim", "code"=>"\n select * from samples\n where status = 'Released'\n "}
@c-lliope
c-lliope / new_digitalocean_site
Last active April 25, 2018 04:13
Deploy a `docker-compose` based application to DigitalOcean
#!/bin/bash
# Make sure we're connected to the Docker host
eval $(SHELL=bash docker-machine env)
if hash doctl 2>/dev/null; then
echo "doctl is installed. Continuing."
echo
else
echo "'doctl' is not installed."
@c-lliope
c-lliope / crontab
Created October 20, 2017 18:00
Template for using `/etc/crontab` with `docker-compose`
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
@c-lliope
c-lliope / house.links.txt
Last active March 31, 2019 04:49
A list of links to proposed legislation from congress. These were found by performing a DuckDuckGo search for 'S. ll "In the Senate of the United States" filetype:pdf' and 'H. R. ll IN THE HOUSE OF REPRESENTATIVES "(Original Signature of Member) " filetype:pdf'.
@c-lliope
c-lliope / shpotify help
Created June 30, 2017 16:43
Shpotify command-line usage
Usage:
spotify <command>
Commands:
play # Resumes playback where Spotify last left off.
play <song name> # Finds a song by name and plays it.
play album <album name> # Finds an album by name and plays it.
play artist <artist name> # Finds an artist by name and plays it.
package main
import (
"encoding/json"
"fmt"
"os"
)
type Person struct {
Name string
@c-lliope
c-lliope / keybase.md
Created August 28, 2016 18:20
Proof of my GitHub account

Keybase proof

I hereby claim:

  • I am graysonwright on github.
  • I am graysonwright (https://keybase.io/graysonwright) on keybase.
  • I have a public key ASBudAIYSTApmR3OrJC2d6xQWtHYLEoXl94YY9lBgYL18Ao

To claim this, I am signing this object:

@c-lliope
c-lliope / bench.rb
Last active December 8, 2015 08:32
benchmarking selectively fetching keys from a ruby hash
require 'benchmark'
ATTRIBUTE_TYPES = {}.tap do |hash|
struct = Struct.new(:searchable?)
50.times do |i|
searchable_val = [true, false].sample
hash[i] = struct.new(searchable_val)
end
end