Skip to content

Instantly share code, notes, and snippets.

@markkcc
markkcc / setup.md
Last active May 8, 2024 16:14
New Macbook Setup

Macbook Setup

  • Terminal: iTerm2 brew install iterm2
    • Font: IBM Plex
      • brew tap homebrew/cask-fonts
      • brew install font-ibm-plex
  • Homebrew:
    • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    • (echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/mfk/.zprofile
    • eval "$(/opt/homebrew/bin/brew shellenv)"
@markkcc
markkcc / switching-to-webdrivers-gem.md
Last active November 23, 2023 07:00
Fixing Chromedriver compatibility issues in Heroku

Fixing Selenium Webdriver Compatibility Errors in Heroku

The Problem

If you are using the chromedriver and Google Chrome Heroku buildpacks together, you may run into a driver compatibility issue with the version of chrome installed.

Example error:

Selenium::WebDriver::Error::SessionNotCreatedError (session not created: This version of ChromeDriver only supports Chrome version 83):
@markkcc
markkcc / Selenium-Screenshots-Ruby.md
Last active May 21, 2020 05:11
Take Screenshots with Selenium

Taking screenshots with Selenium

Required Gems

gem 'webdrivers'
gem 'selenium-webdriver'

Selenium and Chrome

@markkcc
markkcc / heroku-cli.md
Last active May 20, 2020 02:57
Heroku CLI Cheatsheet

Installing and setting up Heroku CLI

Tested on Ubuntu 20.04 LTS

sudo snap install --classic heroku
heroku login

Creating a Heroku app for your git repo

@markkcc
markkcc / password.java
Created December 15, 2012 16:42
Solution in Java to Problem C. "Encrypted Password" from Arab Collegiate Programming Contest (ACPC) 2012.
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
public class password {
public static void main(String[] args) throws FileNotFoundException {
Scanner scan = new Scanner(new File("password.in"));