Instantly share code, notes, and snippets.

Lewis Cowles Lewiscowles1986

View GitHub Profile
View login.js
module.exports = {
run(context) {
return context.runWithDriver((driver) => {
return driver.get(context.options.loginUrl)
.then(() => {
const webdriver = context.webdriver;
const until = webdriver.until;
const By = webdriver.By;
const userName = context.options.username || 'admin';

Get docker container IP address by name


mkdir -p $HOME/bin
wget -O ~/bin/docker-container-ip
chmod +x ~/bin/docker-container-ip
View scroll-position-hide-fb.js
(function(target, threshold, elem) {
listener = () => {
if (target.scrollY > threshold) { = 1;
} else { = 0;
View count-lines
This utility allows you to count the number of lines in files
by default just .py files, but accepts command-line arguments.
This utility does miss files and folders beginning with '.'
so don't use them!
usage: {script} {path} [extensions] [exclude]
View index.php
Plugin Name: CODESIGN2 Media Taxonomy Modifications
Plugin URI:
Description: We think it's a real shame that media can be a little unweildy, and not make much sense; on larger sites it's debilitating, so we made this plugin. Enjoy
Version: 1.3.6
Author URI:
View grub.cfg
# This grub.cfg file was created by Lance
# Suggested Entries and the suggestor, if available, will also be noted.
set timeout=10
set default=0
set gfxpayload=keep
submenu "Ubuntu" {
menuentry "Ubuntu Desktop ISO" {
set isofile=/ubuntu.iso
View closestNumberArray.js
var array = [];
function closest(array,num){
var i=0;
var minDiff=1000;
var ans;
for(i in array){
var m=Math.abs(num-array[i]);
View destroy-sticky-header.js
* Find sticky header elements annoying? Well delete them with this
* inspired by
* improved (IE9, all recent chrome, mozilla, mobile browsers) using information from:
* -
* -
* -
* -
mkdir -p ~/nextcloud
docker run -t -d --restart=always --name=nextcloud --publish 7000:80 --volume $PWD/nextcloud:/var/www/html:z nextcloud
mkdir -p ~/onlyoffice
docker run -i -t -d --name=onlyoffice -p 7050:80 \
--volume ~/onlyoffice/logs:/var/log/onlyoffice:z \
--volume ~/onlyoffice/data:/var/www/onlyoffice/Data:z \
--volume ~/onlyoffice/lib:/var/lib/onlyoffice:z \
--volume ~/onlyoffice/db:/var/lib/postgresql:z onlyoffice/documentserver