/**
* Default circular array size.
*/
export const DEFAULT_CIRCULAR_ARRAY_SIZE = 2000
/** Array with a maximum length shifting items when full. */
export class CircularArray<T> extends Array<T> {
/** @inheritdoc */
public size: number
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AUTO GENERATE SIMPLE UNIQUE ID'S FOR NON-EMPTY ROWS | |
// | |
// Author: Carlos Perez, [email protected] | |
// | |
// Purpose: This Google Sheets script fires when any cell is edited and | |
// inserts a random (reasonably unique) UID of ID_LENGTH length | |
// into the specified ID_COLUMN. For instance if the first column in the | |
// sheet specified by SHEETNAME is the column where you would like the | |
// UID injected, then ID_COLUMN should be 1. | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit: pwnsdx https://gist.github.com/pwnsdx/1217727ca57de2dd2a372afdd7a0fc21; nebular https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3#gistcomment-3019082 | |
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it! | |
# IMPORTANT: You will need to disable SIP: Reboot to Recovery, in Terminal csrutil disable | |
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars. | |
# Get active services: launchctl list | grep -v "\-\t0" | |
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents | |
# List disabled services: launchctl print-disabled user/501 |grep true & launchctl print-disabled system |grep true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There are two parts to this: | |
1. The main Python code that uses requests + json to parse the events | |
2. The external Jinja2 template that the data is rendered by, producing the HTML output | |
# ---------------------------------------------------------------------------------------------------------------- | |
#!/usr/bin/env python3 | |
import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @typedef {Object} ClassifyProps | |
* @property {React.ElementType} [as] - Element to render | |
* @property {import('clsx').ClassValue} [className] - Composable classnames passed to clsx | |
*/ | |
/** | |
* @param {ClassifyProps} props | |
*/ | |
function Classify({ as: El = "div", ...props }) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This code sample uses the 'node-fetch' library: | |
// https://www.npmjs.com/package/node-fetch | |
const fetch = require("node-fetch"); | |
const bodyData = `{ | |
"update": {}, | |
"fields": { | |
"summary": "Main order flow broken", | |
"parent": { | |
"key": "PROJ-123" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DependencyList, useMemo } from "react"; | |
import { | |
ImageStyle, | |
RegisteredStyle, | |
StyleProp, | |
StyleSheet, | |
TextStyle, | |
ViewStyle, | |
} from "react-native"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Warning: This config does not include keys that have an unset value | |
# ~/.config/starship.toml | |
format = '''\[$time\] $status$cmd_duration$username@$hostname \[$directory\] | |
[> ](bold)''' | |
scan_timeout = 30 | |
command_timeout = 500 | |
add_newline = false | |
[aws] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { FormControl, Input } from 'native-base' | |
import React from 'react' | |
import { | |
Control, | |
Controller, | |
FieldError, | |
Path, | |
RegisterOptions, | |
} from 'react-hook-form' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { ComponentProps, ComponentType } from 'react' | |
import { | |
Platform, | |
Pressable, | |
Text, | |
TextProps, | |
ViewProps, | |
View, | |
} from 'react-native' | |
import { useLinkProps } from '@react-navigation/native' |