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
| export async function retryAsync<T>( | |
| asyncFn: () => Promise<T>, | |
| maxRetries: number, | |
| ): Promise<T> { | |
| let retries = 0; | |
| while (retries < maxRetries) { | |
| try { | |
| return await asyncFn(); | |
| } catch (error) { |
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
| { | |
| "root": true, | |
| "extends": [ | |
| "eslint:recommended", | |
| "plugin:@typescript-eslint/recommended", | |
| "plugin:import/recommended", | |
| "plugin:import/typescript", | |
| "plugin:react/recommended", | |
| "plugin:react/jsx-runtime", | |
| "plugin:react-hooks/recommended" |
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
| exiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" "-FileCreateDate<PhotoTakenTimeTimestamp" -ext "*" -overwrite_original -progress --ext 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
| export ANTIGEN_PATH=~/.antigen | |
| source $ANTIGEN_PATH/antigen.zsh | |
| antigen use oh-my-zsh | |
| antigen theme robbyrussell | |
| antigen bundle zsh-users/zsh-autosuggestions | |
| antigen bundle zsh-users/zsh-completions | |
| antigen bundle zsh-users/zsh-history-substring-search | |
| antigen bundle zsh-users/zsh-syntax-highlighting | |
| antigen apply | |
| bindkey "^[[A" history-substring-search-up |
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 { call, cancel, fork, take } from 'redux-saga/effects'; | |
| export function takeLatestPerKey(patternOrChannel, worker, keySelector, ...args) { | |
| return fork(function*() { | |
| const tasks = {}; | |
| while (true) { | |
| const action = yield take(patternOrChannel); | |
| const key = yield call(keySelector, action); |
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
| const { REQUEST, SUCCESS, FAILURE } = makeApiActionTypes('GET_USERS'); | |
| // register the reducer somewhere | |
| const usersReducer = makeApiReducer({ REQUEST, SUCCESS, FAILURE }); | |
| const makeSelectUserById = id => state => state.users.byId[id]; | |
| function* getUsersSaga() { | |
| try { | |
| const { data } = yield call(axios, { |
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
| Ext.onReady(function () { | |
| Ext.define('Ext.override.eventLogging.Component', { | |
| override: 'Ext.Component', | |
| initComponent: function () { | |
| var self = this | |
| Ext.util.Observable.capture(self, function (eventName) { | |
| console.log(eventName, self.getId(), self) | |
| }) | |
| self.callParent(arguments) | |
| } |
NewerOlder