This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
# Versions | |
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku config:set $(cat .env | sed '/^$/d; /#[[:print:]]*$/d') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku config | sed 's/: */=/g; /^=/d' >> .env | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import operator | |
chars = {True: 'QQ|', False: '__|'} | |
def queens(x, y): | |
def go_deep(xs, ys, us, vs): | |
if len(xs) == 0: | |
return () | |
row = xs[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import operator | |
goal = (1, 2, 3, 4, 5, 6, 7, 8, 0) | |
directions = (left, right, up, down) = range(4) | |
directions_str = {left : 'left', right : 'right', up : 'up', down : 'down'} | |
moves = {right: (-1, lambda pos: pos % 3 != 0), | |
left: (1, lambda pos: pos % 3 != 2), | |
down: (-3, lambda pos: pos > 2), | |
up: (3, lambda pos: pos < 6)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(a, b, c, d, e, f, g, h, i, j, k, z) = range(12) | |
names = {a : 'a', b : 'b', c : 'c', d : 'd', e : 'e', f : 'f', g : 'g',\ | |
h : 'h', i : 'i', j : 'j', k : 'k', z : 'z'} | |
cities = {'a' : a, 'b' : b, 'c' : c, 'd' : d, 'e' : e, 'f' : f, 'g' : g,\ | |
'h' : h, 'i' : i, 'j' : j, 'k' : k, 'z' : z} | |
# a, b, c, d, e, f, g, h, i, j, k, z | |
ways = ((0, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0), # a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby version used 1.9.3 | |
require 'rubygems' | |
require 'active_resource' | |
require 'ghee' # GitHub's API gem | |
GH_LOGIN = '' # set to yours | |
GH_PASSWORD = '' # set to yours | |
GH_REPOSITORY_OWNER = 'john' | |
GH_REPOSITORY_NAME = 'application' |