Skip to content

Instantly share code, notes, and snippets.

View maxfarseer's full-sized avatar

Max P maxfarseer

View GitHub Profile
@whitehorse0
whitehorse0 / artillery-config.test.yaml
Last active February 21, 2024 18:59
Artillery configuration example Load testing, and allow writing custom logic JS functions to be called at certain points during the execution of a scenario.
config:
target: "http://localhost:8000"
http:
timeout: 10 # Responses have to be sent within 10 seconds or the request will be aborted
processor: "./processor.js"
phases:
# Create 100 virtual users every second for 60 seconds
- duration: 60 # seconds
arrivalRate: 100 # virtual users
@cereallarceny
cereallarceny / index.js
Last active May 2, 2023 06:41
Server-side rendering in Create React App
const md5File = require('md5-file');
const path = require('path');
// CSS styles will be imported on load and that complicates matters... ignore those bad boys!
const ignoreStyles = require('ignore-styles');
const register = ignoreStyles.default;
// We also want to ignore all image requests
// When running locally these will load from a standard import
// When running on the server, we want to load via their hashed version in the build folder
# Echo number of GIT commits per year.
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}'
@DianaEromosele
DianaEromosele / Change "origin" of your GIT repository
Created August 7, 2016 00:31
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@Dr-Nikson
Dr-Nikson / README.md
Last active June 8, 2023 12:04
Auth example (react + redux + react-router)