Skip to content

Instantly share code, notes, and snippets.

View b4oshany's full-sized avatar

Oshane Bailey b4oshany

View GitHub Profile
@b4oshany
b4oshany / installchrome.sh
Last active September 20, 2018 16:30
Robot Framework for Kotti
#!/bin/bash
BASE=$PWD
# from https://chromium.woolyss.com/
# and https://gist.github.com/addyosmani/5336747
# and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
sudo apt-get update
sudo apt-get install -y libappindicator1 fonts-liberation
cd dumps
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt-get -y install dbus-x11 xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic xfonts-scalable
@b4oshany
b4oshany / tinymce.keywords.robot
Created September 20, 2018 17:31
Robot Framework Keywords for TinyMCE
*** Settings ***
Documentation A resource file with reusable keywords and variables.
...
... The system specific keywords created here form our own
... domain specific language. They utilize keywords provided
... by the imported Selenium2Library.
Library Selenium2Library
*** Variables ***
${BROWSER} phantomjs
@b4oshany
b4oshany / upgrade-to-php7.sh
Last active November 18, 2018 01:52
Upgrade to PHP7
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
sudo apt-get install php7.0 -y
sudo apt-get install php7.0-mysql -y
sudo apt-get install php7.0-curl -y
sudo apt-get install php7.0-mbstring -y
sudo apt-get install php7.0-dom -y
@b4oshany
b4oshany / occupations.json
Created January 8, 2019 20:34
List of occupations
['Professor', 'Teacher', 'Actor', 'Clergy', 'Musician', 'Philosopher', 'Visual Artist', 'Writer', 'Audiologist', 'Chiropractor', 'Dentist', 'Dietitian', 'Doctor', 'Medical Laboratory Scientist', 'Midwive', 'Nurse', 'Occupational therapist', 'Optometrist', 'Pathologist', 'Pharmacist', 'Physical therapist', 'Physician', 'Psychologist', 'Speech-language pathologist', 'Accountant', 'Actuarie', 'Agriculturist', 'Architect', 'Economist', 'Engineer', 'Interpreter', 'Attorney at law', 'Advocate', 'Solicitor', 'Librarian', 'Statistician', 'Surveyor', 'Urban planner', 'Human resource', 'Firefighter', 'Judge', 'Military officer', 'Police officer', 'Air traffic controller', 'Aircraft pilot', 'Sea captain', 'Scientist', 'Astronomer', 'Biologist', 'Botanist', 'Ecologist', 'Geneticist', 'Immunologist', 'Pharmacologist', 'Virologist', 'Zoologist', 'Chemist', 'Geologist', 'Meteorologist', 'Oceanographer', 'Physicist', 'Programmer', 'Web developer', 'Designer', 'Graphic designer', 'Web designer', 'Software Developer', 'Entrepr
@b4oshany
b4oshany / mailchimp-template.html
Created January 20, 2019 19:12
MailChimp HTML Template for Newsletter
<style type="text/css">
[class*="card"] {
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.2);
transition: 0.3s;
margin-bottom: 20px;
}
[class*="card"]:hover {
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
}
@b4oshany
b4oshany / package-release.sh
Created January 20, 2019 22:55
Deploy Python package to PyPi
#!/bin/bash
rm dist/*
python setup.py sdist bdist_wheel
twine upload dist/*
@b4oshany
b4oshany / plonedocviewer.sh
Created May 18, 2019 23:46
Document Viewer Installation script
sudo apt-get install -y pdftk
sudo apt-get install -y graphicsmagick
sudo apt-get install -y poppler-utils
sudo apt-get install -y poppler-data
sudo apt-get install -y ghostscript
sudo apt-get install -y tesseract-ocr
@b4oshany
b4oshany / plone-link-widget.py
Created May 29, 2019 16:45
Plone Link Widget
@b4oshany
b4oshany / fix-docker-login.sh
Created August 24, 2019 07:19
Fix docker login fails on a server with no X11 installed
sudo apt install gnupg2 pass -y
gpg2 --full-generate-key
pass init "whatever key id you have"
@b4oshany
b4oshany / export-content.py
Created January 7, 2020 10:26
Plone Exporter
import argparse
import base64
import errno
import logging
import time
import os
import re
from datetime import datetime
from fnmatch import fnmatch
from StringIO import StringIO