git for-each-ref --format '%(refname:short)' refs/heads | grep -v main | xargs git branch -D
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 { PostgresJsDatabase } from 'drizzle-orm/postgres-js'; | |
| import type * as schema from './schema'; | |
| let _db!: PostgresJsDatabase<typeof schema> | null; | |
| export function getDb(): PostgresJsDatabase<typeof schema> { | |
| if (!_db) { | |
| throw new Error('DB is not set in the singleton.'); | |
| } |
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
| public static class EnumerableExtensions | |
| { | |
| public static IEnumerable<TResult> ZipLongest<TResult>(this IEnumerable<TResult> first, IEnumerable<TResult> second) | |
| { | |
| if (first == null) | |
| { | |
| throw new ArgumentNullException(nameof(first)); | |
| } | |
| if (second == null) |
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
| public abstract class BaseLoader<T> : IBaseLoader<T> | |
| where T : class | |
| { | |
| private readonly ConcurrentDictionary<string, Lazy<Task<T?>>> cache = new(); | |
| public Task<T?> LoadAsync(string key, Func<Task<T?>> factory) | |
| { | |
| return cache.GetOrAdd(key, (_) => new Lazy<Task<T?>>(factory)).Value; | |
| } | |
| } |
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
| namespace Wanderlust.API.Presentation.Queries; | |
| using System; | |
| using System.Threading; | |
| using HotChocolate.Types.Pagination; | |
| [ExtendObjectType(OperationTypeNames.Query)] | |
| [GraphQLName(nameof(TodoQuery))] | |
| public class TodoQuery | |
| { |
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
| namespace Wanderlust.API.Presentation.Queries; | |
| using HotChocolate.Types.Pagination; | |
| [ExtendObjectType(OperationTypeNames.Query)] | |
| [GraphQLName(nameof(TodoQuery))] | |
| public class TodoQuery | |
| { | |
| [UsePaging] | |
| public Connection<ITodoResult> GetTodos(string? after, int? first) |
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 | |
| [*.yml] | |
| indent_style = space | |
| indent_size = 2 | |
| [*.cs] | |
| charset = utf-8-bom | |
| insert_final_newline = true | |
| indent_style = space |
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
| var dataLoader = new DataLoader(); | |
| Console.WriteLine("Executing..."); | |
| var t1 = dataLoader.LoadAsync("1"); | |
| var t2 = dataLoader.LoadAsync("1"); | |
| var t3 = dataLoader.LoadAsync("9999"); | |
| Console.WriteLine("Done Loading..."); |
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
| onPress={() => { | |
| // Navigation.showModal({ | |
| // component: { | |
| // name: 'DescriptionScreen', | |
| // options: { | |
| // topBar: { | |
| // visible: true, | |
| // title: { | |
| // text: 'Modal2', | |
| // }, |
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 React from 'react'; | |
| import {View, Dimensions} from 'react-native'; | |
| import Animated, { | |
| useAnimatedScrollHandler, | |
| useAnimatedStyle, | |
| useSharedValue, | |
| } from 'react-native-reanimated'; | |
| const BORDER_RADIUS = 10; |
NewerOlder