Skip to content

Instantly share code, notes, and snippets.

View b4oshany's full-sized avatar

Oshane Bailey b4oshany

View GitHub Profile
@b4oshany
b4oshany / plone-link-widget.py
Created May 29, 2019 16:45
Plone Link Widget
@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 / 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 / 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 / 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 / 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 / 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 / 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 / plone.nginx.conf
Created September 9, 2018 18:05
Plone nginx.conf
upstream plone {
server 127.0.0.1:12030;
server 127.0.0.1:12031;
}
server {
server_name <<<Site>>>;
access_log /var/log/nginx/<<<Site>>>.access.log;
error_log /var/log/nginx/<<<Site>>>.error.log;
set $vh_protocol "https";
@b4oshany
b4oshany / mosaic-bootstrap-rules.xml
Created September 4, 2018 20:53
Diazo recipe make the Plone Mosaic editor compatible with Bootstrap CSS grid.
<?xml version="1.0" encoding="UTF-8"?>
<rules
xmlns="http://namespaces.plone.org/diazo"
xmlns:css="http://namespaces.plone.org/diazo/css"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:xi="http://www.w3.org/2001/XInclude">
<!-- Transform Mosaic Grid to Bootstrap Grid -->
<rules css:content="body.mosaic-grid.template-layout">
<replace css:content=".mosaic-grid-row">