Skip to content

Instantly share code, notes, and snippets.

@llighterr
llighterr / install.sh
Created April 10, 2020 05:06 — forked from ziadoz/install.sh
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/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`
@llighterr
llighterr / set-heroku-config-vars-from-env.sh
Last active May 7, 2018 06:22 — forked from tibawatanabe/set-heroku-config-vars-from-env.sh
Command line to read .env file and set Heroku config vars
heroku config:set $(cat .env | sed '/^$/d; /#[[:print:]]*$/d')
@llighterr
llighterr / save-heroku-config-vars-to-env.sh
Created May 7, 2018 06:21 — forked from tibawatanabe/save-heroku-config-vars-to-env.sh
Command line to save Heroku config vars into .env file
heroku config | sed 's/: */=/g; /^=/d' >> .env
@llighterr
llighterr / es6.py
Created November 30, 2015 11:41
Expert System Lab 6
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]
@llighterr
llighterr / es5.py
Created November 30, 2015 11:40
Expert System Lab 5
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)}
@llighterr
llighterr / es4.py
Created November 30, 2015 11:39
Expert System Lab 4
(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
# 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'