Skip to content

Instantly share code, notes, and snippets.

@noinarisak
noinarisak / Dockerfile
Last active March 1, 2024 10:20
VsCode devcontainer development setup for Java 8
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
FROM openjdk:8-jdk
# This Dockerfile adds a non-root user with sudo access. Use the "remoteUser"
# property in devcontainer.json to use it. On Linux, the container user's GID/UIDs
# will be updated to match your local UID/GID (when using the dockerFile property).
@michaellihs
michaellihs / patterns-antipatterns-cicd.md
Last active January 7, 2024 10:12
Patterns and Anti-Patterns for CI/CD

Patterns and Anti-Patterns for CI/CD

The Developer Experience

  • The developer journey
    • visualize devs' emotions during their workflow
  • make sure to provide a good experience for your devs as well (not only for customers and users)

Working Models

@mort3za
mort3za / lighthouse.js
Created May 29, 2019 15:12
Run lighthouse programmatically for multiple pages
// yarn add --dev lighthouse cross-env
// in package.json:
// scripts: { "lighthouse-dev": "cross-env NODE_ENV=development node ./lighthouse.js",
// "lighthouse-prod": "cross-env NODE_ENV=production CHROME_FLAGS=--headless node ./lighthouse.js" }
const lighthouse = require('lighthouse')
const chromeLauncher = require('chrome-launcher')
const fs = require('fs')
const mode = process.env.NODE_ENV
const chromeFlags = '-headless'
@amad-person
amad-person / gist:f0ef85a2123a2e1fcf8052dcf09eef90
Last active August 12, 2023 17:38
Bypass CSP restrictions in create-react-app Chrome extensions

While building a React Chrome extension using the create-react-app utility (v2.x), I came across the following error on loading my unpacked extension:

Refused to execute inline script because it violates the following Content Security Policy directive: “script-src ‘self’
blob: filesystem: chrome-extension-resource:”. Either the ‘unsafe-inline’ keyword, a hash (‘sha256-
GgRxrVOKNdB4LrRsVPDSbzvfdV4UqglmviH9GoBJ5jk=’), or a nonce (‘nonce-…’) is required to enable inline execution.

Basically, this error arises as Chrome (or almost any modern browser) will not allow inline scripts to get executed. This CSP restriction resulted in the above error as the build script in create-react-app bundles the .js files in <script> tags in the <body> of index.html.

@sujinleeme
sujinleeme / README.md
Created March 30, 2018 13:46 — forked from akashnimare/README.md
A Beginners Guide to writing a Kickass README ✍

Project title

A little info about your project and/ or overview that explains what the project is about.

Motivation

A short description of the motivation behind the creation and maintenance of the project. This should explain why the project exists.

Build status

Build status of continus integration i.e. travis, appveyor etc. Ex. -

Build Status

@Warchant
Warchant / sonarqube-docker-compose.yml
Last active May 28, 2024 20:24
docker-compose file to setup production-ready sonarqube
version: "3"
services:
sonarqube:
image: sonarqube
expose:
- 9000
ports:
- "127.0.0.1:9000:9000"
networks:
@luciddreamz
luciddreamz / keycloak.sh
Last active June 17, 2024 13:49 — forked from paoloantinori/keycloak.sh
Keycloak Admin API Rest Example: Get User
#!/bin/bash
# requires https://stedolan.github.io/jq/download/
# config
KEYCLOAK_URL=http://localhost:8080/auth
KEYCLOAK_REALM=realm
KEYCLOAK_CLIENT_ID=clientId
KEYCLOAK_CLIENT_SECRET=clientSecret
USER_ID=userId
@ziadoz
ziadoz / install.sh
Last active April 20, 2024 10:18
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`