Skip to content

Instantly share code, notes, and snippets.

View prashanth-sams's full-sized avatar
🍎
Each day is interesting!!!

Prashanth Sams prashanth-sams

🍎
Each day is interesting!!!
View GitHub Profile
@prashanth-sams
prashanth-sams / test_selenium.py
Last active April 17, 2024 13:17
Screenshot Example | pytest-html-reporter
from selenium import webdriver
import unittest
from pytest_html_reporter import attach
class TestClass(unittest.TestCase):
def __init__(self, driver):
super().__init__(driver)
def setUp(self):
global driver
@alukach
alukach / app.yaml
Last active July 10, 2024 05:08
An example Github Actions for Python + Pipenv + Postgres + Pyright
# .github/workflows/app.yaml
name: My Python Project
on: push
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
"scripts": {
"test:consumer": "jest --runInBand __tests__/contract/consumer/consumer.spec.js",
"publish:broker": "node ./__tests__/contract/broker/publish.js",
"publish:pactflow": "pact-broker publish ./pacts --consumer-app-version=1.0.0 --broker-base-url=PACTFLOW_URI --broker-token=PACTFLOW_TOKEN",
"up:mock-service": "./node_modules/.bin/json-server ./data/characters.json -p 3378 -w",
"test:provider-broker": "jest --runInBand __tests__/contract/provider/provider.spec.js --testTimeout=20000"
},
@prashanth-sams
prashanth-sams / helm_chart_cheatsheet.md
Last active March 4, 2022 20:12
Helm Chart Cheatsheet

Install helm

brew install kubernetes-helm

Initialize helm

helm init
@beardedtim
beardedtim / handlers.js
Created June 30, 2019 17:08
Querying graph data inside postgres
const { Router } = require('express')
const Step = new Router()
Step.get('/starting_at/:id', async (req, res) => {
const { rows } = await db.query(`
SELECT *
FROM nodes
WHERE
meta @> '{"starting_states": ["${req.params.id}"]}'
`)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
job("main-repo") {
scm {
github("StephenKing/chef-ci-main-repo")
}
steps {
shell("knife upload roles environments data_bags --chef-repo-path ./")
}
}
@ksandermann
ksandermann / Dockerfile
Last active June 24, 2019 14:10
kubespray-issue-ksandermann-output
FROM ubuntu:16.04
LABEL maintainer="kevin.sandermann@gmail.com"
#proxy settings
ARG http_proxy=http://193.29.130.150:8080
ARG https_proxy=http://193.29.130.150:8080
ENV http_proxy ${http_proxy:-v0}
ENV https_proxy ${https_proxy:-v0}
#set http(s) proxy for apt
@nicosingh
nicosingh / alert-manager.md
Last active February 27, 2024 23:46
A small and local configuration for Prometheus + AlertManager + Slack notifications + Unsee

TL;DR

Clone this repo:

git clone https://gist.github.com/08be6d6e7605a43fe52d1f201c2b47d8.git
cd 08be6d6e7605a43fe52d1f201c2b47d8

Start the docker stack:

@Yipee-ki-yay
Yipee-ki-yay / .env
Last active March 6, 2019 12:57
.env
APP_NAME=Poputi
APP_ENV=local
APP_KEY=base64:59fCCVQ2O9v4Znp86koSAuXg2N2lTuVj1m+ApJ91lS8=
APP_DEBUG=true
APP_URL=http://localhost
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=localhost