Skip to content

Instantly share code, notes, and snippets.

View c01nd01r's full-sized avatar

Stanislav c01nd01r

View GitHub Profile
@ixahmedxi
ixahmedxi / settings.json
Created January 2, 2024 08:05
My settings.json
{
"workbench.startupEditor": "none",
"workbench.iconTheme": "moxer-icons",
"workbench.colorTheme": "Aura Dark",
"workbench.settings.editor": "json",
"breadcrumbs.enabled": false,
"explorer.compactFolders": false,
"editor.wordWrap": "bounded",
"editor.tabSize": 2,
"editor.inlineSuggest.enabled": true,
@yyx990803
yyx990803 / 3.4.md
Last active December 29, 2023 16:42
[DRAFT] Vue 3.4 aggregated changelog

[DRAFT] 3.4.0 Aggregated Changelog

This is the aggregated changelog for 3.4 that includes changes landed in all alpha and beta pre-releases. For changelog of individual pre-releases, please check here.

Features

@ohaiibuzzle
ohaiibuzzle / tof_pc_login.sh
Last active February 18, 2024 19:35
Script to login to ToF on PlayCover
# Script to login to ToF on PlayCover
# Select the ToF version
echo "Please select the region of ToF you want to login to:"
echo "[1] Global"
echo "[2] China"
read -p "Enter your choice: " choice
if [ $choice -eq 1 ]; then

Install dependencies:

npm install @capacitor/{core,cli,ios,android}

Add capacitor config:

import { CapacitorConfig } from '@capacitor/cli';
@artbutko
artbutko / locale.ru.js
Created February 17, 2021 14:12
Русская локализация agGrid / Russian localization for agGrid (early 2021)
const AG_GRID_LOCALE_RU = {
// Выбор фильтра
selectAll: '(Выделить все)',
selectAllSearchResults: '(Выделить все результаты поиска)',
searchOoo: 'Поиск...',
blanks: '(Пусто)',
noMatches: 'Нет совпадений',
// Числовой фильтр & текстовый фильтр
filterOoo: 'Фильтрация...',
function partition(inputArray, callback) {
const result = {};
for (const [indexOfValue, value] of inputArray.entries()) {
const propertyKey = callback(value, indexOfValue);
if (propertyKey === null || propertyKey === '') {
continue;
}
if (!{}.hasOwnProperty.call(result, propertyKey)) {
result[propertyKey] = [];
}
@exdeniz
exdeniz / autofill-reset.css
Created May 24, 2020 00:56
Full reset autofill
input:-webkit-autofill,
input:-webkit-autofill::first-line,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
@YozhEzhi
YozhEzhi / cats.md
Last active February 19, 2024 20:06
[Конспект] Дж.Ханк Рейнвотер - Как пасти котов. Наставление для программистов, руководящих другими программистами
@slikts
slikts / advanced-memo.md
Last active April 27, 2024 02:40
Advanced memoization and effects in React

nelabs.dev

Advanced memoization and effects in React

Memoization is a somewhat fraught topic in the React world, meaning that it's easy to go wrong with it, for example, by [making memo() do nothing][memo-pitfall] by passing in children to a component. The general advice is to avoid memoization until the profiler tells you to optimize, but not all use cases are general, and even in the general use case you can find tricky nuances.

Discussing this topic requires some groundwork about the technical terms, and I'm placing these in once place so that it's easy to skim and skip over:

  • Memoization means caching the output based on the input; in the case of functions, it means caching the return value based on the arguments.
  • Values and references are unfortunately overloaded terms that can refer to the low-level implementation details of assignments in a language like C++, for example, or to memory
@darwin
darwin / readme.md
Last active April 9, 2024 22:30
APFS Container cloning/replicating under Catalina (with a bootable system)

Today I wanted to move existing APFS-resident macOS Catalina installation to a new disk. I upgraded my late 2014 Mac Mini with a shiny new 1TB SSD. This took way too many hours of my life I will never get back. Hope this saves some time to you.

Good news:

  1. it is possible to create a DMG image from existing APFS container with macOS Catalina installation including metadata needed for complete restore (the DMG contains OS, OS Data, Preboot, Recovery and VM volumes)
  2. it is possible to restore this DMG image into empty APFS container and get a bootable copy of the original system

This information is relevant for Catalina (I'm currently running macOS 10.15.1).