Skip to content

Instantly share code, notes, and snippets.

View dkarter's full-sized avatar

Dorian Karter dkarter

View GitHub Profile
module Pages
class Checkout
include Capybara::DSL
def visit
visit checkout_path
end
def change_payment_method(payment_method)
if payment_method == :credit_card
@dkarter
dkarter / test.log
Created September 21, 2016 14:56
Failing `make clean test` on a fresh Elixir master clone
cd lib/elixir && "/Users/dkarter/Dropbox/Developer/forks/elixir/rebar" clean
==> elixir (clean)
rm -rf ebin
rm -rf lib/*/ebin
rm -rf lib/elixir/test/ebin
rm -rf lib/*/tmp
rm -rf lib/mix/test/fixtures/git_repo
rm -rf lib/mix/test/fixtures/deps_on_git_repo
rm -rf lib/mix/test/fixtures/git_rebar
rm -rf lib/elixir/src/elixir.app.src
@dkarter
dkarter / .projections.json
Created October 12, 2016 15:21
Page objects projections config
{
"spec/support/pages/*.rb": {
"type": "page",
"template": [
"module Pages",
" class {camelcase}",
" include Capybara::DSL",
" include CapybaraErrorIntel::DSL",
" include Rails.application.routes.url_helpers",
"",
@dkarter
dkarter / keybase.md
Created February 19, 2017 09:37
Keybase proof of ownership

Keybase proof

I hereby claim:

  • I am dkarter on github.
  • I am doriankarter (https://keybase.io/doriankarter) on keybase.
  • I have a public key ASDQtkGNlS0bRsrTqYHz2kqjQc6apoPAX57DM2eFbJI2igo

To claim this, I am signing this object:

@dkarter
dkarter / forcelowercase.js
Created January 21, 2015 17:25
Angular directive to force lowercase letters on an input textbox as you type
'use strict';
/**
* @ngdoc directive
* @name myapp.directive:forceLowerCase
* @description
* # forceLowerCase
*/
angular.module('myapp')
.directive('forceLowerCase', function ($parse) {
defmodule ThreeTwentyThree do
def find_sum_zero_triplets(list) do
for x <- list, y <- list, z <- list, filter(list, x,y,z) do
Enum.sort([x,y,z])
end
|> Enum.uniq
end
defp filter(list, x,y,z) do
([x,y,z] -- list == []) && (x+y+z == 0)
" ====================================
" GitGutter:
" ====================================
nnoremap <silent> <cr> :GitGutterNextHunk<cr>
nnoremap <silent> <backspace> :GitGutterPrevHunk<cr>
==> Upgrading 1 outdated package, with result:
wireshark 2.4.4
==> Satisfying dependencies
==> Downloading https://www.wireshark.org/download/osx/Wireshark%202.4.4%20Intel%2064.dmg
Already downloaded: /Users/dkarter/Library/Caches/Homebrew/Cask/wireshark--2.4.4.dmg
==> Verifying checksum for Cask wireshark
==> Starting upgrade for Cask wireshark
==> Running uninstall process for wireshark; your password may be necessary
==> Running uninstall script /usr/sbin/dseditgroup
==> Username and password must be provided.
{
"presets": [
[
"env",
{
"targets": {
"browsers": "> 1%",
"uglify": true
},
"useBuiltIns": true
{
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings"
],
"plugins": ["react", "jest"],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {