Skip to content

Instantly share code, notes, and snippets.

View xar's full-sized avatar
💖

Samuel xar

💖
View GitHub Profile
@xar
xar / Dockerfile
Created March 8, 2022 22:16
Cypress & Node
# update the base packages and add a non-sudo user
RUN apt-get update -y && apt-get upgrade -y && adduser --ingroup docker docker
# install python and the packages the your code depends on along with jq so we can parse JSON
# add additional packages as necessary
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip
RUN apt-get update && \
apt-get install -y openjdk-8-jdk && \
apt-get install -y ant xvfb libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth && \
@xar
xar / storage.rules
Created November 7, 2022 15:23
Storage rules exception
// https://firebase.google.com/docs/reference/security/storage
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
function checkFileSize() {
return true;
// return request.resource.size < 10 * 1024 * 1024; // 10MB file size limit
}
function hasPermissionToReadResource(resourceType, resourceId) {