Skip to content

Instantly share code, notes, and snippets.

View atkinchris's full-sized avatar

Chris Atkin atkinchris

View GitHub Profile
@atkinchris
atkinchris / Rogue Melee.xml
Last active March 15, 2024 18:14
Last Epoch filters
<?xml version="1.0" encoding="utf-8"?>
<ItemFilter xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<name>Rogue (Melee)</name>
<filterIcon>6</filterIcon>
<filterIconColor>0</filterIconColor>
<description />
<lastModifiedInVersion>1.0.3.3</lastModifiedInVersion>
<lootFilterVersion>0</lootFilterVersion>
<rules>
<Rule>
@atkinchris
atkinchris / StarfieldCustom.ini
Last active October 1, 2023 18:00
Starfield console command lists
[Display]
fMaxAnisotropy=16
bPilotCameraShakerEnabled=0
[General]
SIntroSequence=0
uMainMenuDelayBeforeAllowSkip=0
bEnableMessageOfTheDay=0
sStartingConsoleCommand=bat cheats
sTestFile1=ShipStorage.esp
@atkinchris
atkinchris / useScrollEffects.js
Created April 13, 2021 18:47
useScrollEffects - to set opacity 0 when scrolling
import { useRef, useCallback, useEffect } from 'react'
/**
* Creates a useScrollEffects hook
* @param {number} safeZone - The vertical position beyond which you need to scroll before scroll effects will happen.
* @param {boolean} reverse - If the behaviour should be reversed, i.e. it hides when scrolling down, not up.
*/
const useScrollEffects = (safeZone = 375, reverse = false) => {
// Create ref to store our target element in.
const ref = useRef(null)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@atkinchris
atkinchris / MyFirstComponent.js
Created August 10, 2020 15:40
Tree shaking - good examples
var MyFirstComponent = function MyFirstComponent(props) {
return /*#__PURE__*/React.createElement("div", props);
};
MyFirstComponent.propTypes = {
children: PropTypes.node,
className: PropTypes.string
};
MyFirstComponent.defaultProps = {
@atkinchris
atkinchris / bad.js
Created August 10, 2020 15:37
Tree-Shaking Examples
var MyFirstComponent = function MyFirstComponent(props) {
return /*#__PURE__*/React.createElement("div", props);
};
MyFirstComponent.propTypes = {
children: PropTypes.node,
className: PropTypes.string
};
MyFirstComponent.defaultProps = {
@atkinchris
atkinchris / android-backup.sh
Created July 5, 2020 10:44
Android Backup Instructions
# List all packages, in order to find com package name for app
adb shell pm list packages -f
# Backup specific application
adb backup -noapk <com package name>
# Use Android Backup Extractor to change backup.ab into a tar file
# https://github.com/nelenkov/android-backup-extractor
java -jar abe-all.jar unpack backup.ab backup.tar
@atkinchris
atkinchris / testToken.js
Created September 30, 2019 08:46
Script to test token against JWKS endpoint
const jwt = require('jsonwebtoken')
const jwksClient = require('jwks-rsa')
const options = {
algorithms: ['RS256'],
}
const client = jwksClient({
jwksUri: 'https://colleague-auth-service.dev.golf-noprod.js-devops.co.uk/jwks',
})
@atkinchris
atkinchris / inline-styles.js
Last active June 23, 2019 09:10
Inline styles and remove classes
document.querySelectorAll('*').forEach((element) => {
const dummy = document.createElement('element-' + Date.now())
document.body.appendChild(dummy)
var defaultStyles = window.getComputedStyle(dummy)
var elementStyles = window.getComputedStyle(element)
for(var key in elementStyles) {
if(elementStyles.hasOwnProperty(key) && defaultStyles[key] !== elementStyles[key]) {
element.style[key] = elementStyles[key]
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: authentication-filter
namespace: goldac
spec:
workloadLabels:
app: vehicle-checks-echo
filters:
- listenerMatch: