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
| # Trying to mimic lazyvim behavior with vimium | |
| # use H and L for tabs | |
| unmap J | |
| unmap K | |
| map H previousTab | |
| map L nextTab | |
| # use same binds as in vim for page up and down | |
| unmap 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
| // use with @Valid @BeanParam in your resource | |
| public record PaginationQuery( | |
| @RestQuery @DefaultValue("1") @Min(1) int page, | |
| @RestQuery @DefaultValue("50") @Max(200) int pageSize) { | |
| } | |
| // wrap your response in this | |
| public record PaginationMeta<T>( | |
| int page, | |
| int pageSize, | |
| int pageCount, |
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
| private function checkPosition(int $x, int $y, array $grid): bool | |
| { | |
| $neighbors = []; | |
| $offsets = [ | |
| [-1, -1], | |
| [-1, 0], | |
| [-1, 1], | |
| [0, -1], | |
| [0, 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
| drop procedure if exists doWhile; | |
| SET autocommit=0; | |
| SET unique_checks=0; | |
| SET foreign_key_checks=0; | |
| DELIMITER // | |
| CREATE PROCEDURE doWhile() | |
| BEGIN | |
| DECLARE i INT default 1; | |
| WHILE (i <= 15000000) DO |
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 { execSync } = require("child_process"); | |
| const fs = require("fs"); | |
| const pattern = /\D{3}_(\d{8})_.*/; | |
| fs.readdir("./", (err, files) => { | |
| files.forEach((file) => { | |
| const match = pattern.exec(file); | |
| const yyyymmdd = match?.[1]; | |
| if (yyyymmdd) { | |
| const output = execSync(`touch -d ${yyyymmdd} -f ${file}`, { encoding: "utf-8" }); |
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 { AxiosError, AxiosInstance } from "axios"; | |
| // using react-native-logger here | |
| import { Logger } from "@/utils/logger"; | |
| export function registerDebugLogger(instance: AxiosInstance) { | |
| Logger.debug("registering debug loggers"); | |
| instance.interceptors.request.use( | |
| (config) => { | |
| Logger.debug( |
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
| // MacOS agents in Azure don't come with base64 installed, so we use node to convert our p8 file to base64 so we can use it in the deployment task | |
| const fs = require("fs"); | |
| // 0 is node | |
| // 1 is location of this file | |
| const filePath = process.argv[2]; | |
| if (!filePath) { | |
| throw new Error("no file path given"); | |
| } |
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
| //put this inside ~/.config/brave-flags.conf | |
| --enable-features=TouchpadOverscrollHistoryNavigation |
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
| { | |
| "manifest_version": 2, | |
| "name": "Everforest", | |
| "version": "1.0.0", | |
| "applications": { | |
| "gecko": { | |
| "id": "some@mail.com", | |
| "strict_min_version": "60.0" | |
| } | |
| }, |
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
| # add to ~/.config/spicetify/Themes/text/color.ini | |
| [Everforest] | |
| accent = a7c080 | |
| accent-active = 98BB6C | |
| accent-inactive = 2e383c | |
| banner = a7c080 | |
| border-active = a7c080 | |
| border-inactive = 7A8478 | |
| header = 9DA9A0 | |
| highlight = 272e33 |
NewerOlder