Skip to content

Instantly share code, notes, and snippets.

View laurencestokes's full-sized avatar

Laurence Stokes laurencestokes

View GitHub Profile
@laurencestokes
laurencestokes / typeHelper.ts
Created March 30, 2023 15:19
axis Type helper in TS
export const typeHelper = (() => {
const types = [
'Array',
'Object',
'String',
'Date',
'RegExp',
'Function',
'Boolean',
'Number',
import React from 'react';
import { render, screen, fireEvent, RenderResult, Queries, RenderOptions } from '@testing-library/react';
import { ThemeProvider } from 'styled-components';
import { theme } from '@gymshark/utils';
import reduce from 'lodash/reduce';
type AdditionalThemes = { [key: string]: unknown }[];
type ContextConfigs<T> = { context: React.Context<T>; value: T; order: number }[];
let themes: AdditionalThemes;
@laurencestokes
laurencestokes / twitterVideo.sh
Last active February 21, 2019 12:03
Get Video File From Twitter
# Takes a string argument to the twitter video m3u8 url and gets each of the .ts segments, then creates an mpeg. Very crude, based on
# http://zeroonelabs.com/how-i-downloaded-a-video-from-twitter-using-curl/
## To get the m3u8 url just check the network tab on the page with the video in your console.
FILE1=$1
declare -a fileArray
fileArray=$(curl --silent $FILE1 | grep -vE "^#" | sed -e 's_^_https://video.twimg.com_g')
import collections
def replace(l, x, y):
s = l.split(",")
print s
keys = x # Strings to be replaced
values = y # Strings to replace with
### Keybase proof
I hereby claim:
* I am laurencestokes on github.
* I am liggles (https://keybase.io/liggles) on keybase.
* I have a public key whose fingerprint is 276C F27F B218 3804 7D28 9551 1048
3643 71BD E1E6
To claim this, I am signing this object: