Skip to content

Instantly share code, notes, and snippets.

View Michael-Stokoe's full-sized avatar

Michael Stokoe Michael-Stokoe

  • Northumberland, United Kingdom
View GitHub Profile
@huytd
huytd / wordle.md
Last active August 27, 2024 20:38
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@b01
b01 / download-vs-code-server.sh
Last active September 5, 2024 21:23
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
# Copyright 2023 Khalifah K. Shabazz
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the “Software”),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
@Michael-Stokoe
Michael-Stokoe / functions.zsh
Last active April 17, 2019 13:23
Laravel/Homestead New Project Script
# Usage:
# Copy this into your .zshrc or .bashrc, then run `source .zshrc`/`source .bashrc`
# the command 'nps' will be available to you afterwards.
# There are some variables you might need to change starting at line 22, ending at line 28.
function nps () {
# New Project Setup. (MUST be ran from inside project DIR)
# Uses the directory name of the project you're in as the URL for the site
# Copies .env, replaces APP_NAME, APP_URL, DB_HOST, DB_DATABASE and REDIS_HOST
@aczietlow
aczietlow / selenium-php-webdriver-cheatsheet.md
Last active September 12, 2024 04:08 — forked from huangzhichong/selenium-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

@huangzhichong
huangzhichong / selenium-webdriver-cheatsheet.md
Created August 7, 2012 12:38
Selenium Webdriver CheatSheet

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL