Skip to content

Instantly share code, notes, and snippets.

View iegik's full-sized avatar
🏠
Working from home

Arturs Jansons iegik

🏠
Working from home
View GitHub Profile

Don't allow sites to save data on your device

Will prevent use of localStorage, sessionStorage

chrome://settings/content/siteData

Settings > Privacy and security > Site settings > Additional content settings > On-device site data > Don't allow sites to save data on your device

localStorage
Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
@iegik
iegik / NPM.md
Last active December 28, 2023 09:53
@iegik
iegik / FAQ.md
Last active December 21, 2023 12:13
React Native tips & tricks

State management

All of the state management libraries you mentioned have their unique features and advantages, and the choice of which one to use ultimately depends on the specific needs and requirements of your project. However, here's a brief overview of each library:

  1. MobX: MobX is a simple, lightweight, and easy-to-learn library for managing state in React applications. It has a reactive programming model and provides automatic state updates, which means you don't have to write complex code for updating your app's state. It also has good performance and works well with TypeScript.

  2. React Context: React Context is a built-in feature of React that allows you to share data between components without having to pass props down the component tree. It's a good choice for simple use cases where you need to share state between components without any complex logic.

  3. Redux: Redux is a widely-used library that provides a single source of truth for managing state in large-scale React applications. It has

quick, brown fox? jumped over! the lazy dog.

Quick, Brown Fox? Jumped Over! The Lazy Dog.

Quick, Brown Fox? Jumped Over! The Lazy Dog.

QUICK, BROWN FOX? JUMPED OVER! THE LAZY DOG.

эй, жлоб! где туз? прячь юных съёмщиц в шкаф.

@iegik
iegik / README.md
Last active December 8, 2023 09:02

Date/Time

const date = new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738));
// Results below assume UTC timezone - your results may vary

// Specify default date formatting for language (locale)
console.log(new Intl.DateTimeFormat('en-US').format(date));
// expected output: "12/20/2020"
 
@iegik
iegik / README.md
Last active December 7, 2023 09:47

unknown

unknown | any

;(unknownValue as Function).call(null)

infer

@iegik
iegik / .bash_aliases
Last active November 22, 2023 13:32
Development environment
# Aliases
# To unset alias use: `unalias ...`
alias ll='ls -lG'
alias ss='stat --printf="%A\t%a\t%h\t%U\t%G\t%s\t%.19y\t%n\n"'
#alias traceroute='tracert -d'
alias timestamp='date +%Y%m%d%H%M%S'
alias iso='date +%Y-%m-%dT%H:%M:%S'
# brew install w3m
alias html2text="w3m -dump -T 'text/html'"
alias untar="tar -zxvf"
@iegik
iegik / README.md
Last active November 15, 2023 15:27
Framework Web iOS Android Language Integration Cost per month
GhostInspector Y N N .side.Selenium, python Azure•GitHub•Jenkins Already have license
RobotFramework Y Y Y Python, Java, .NET, Jython, IronPython Git Free
Testproject Y Y Y Python, Java Jenkins Free
Testcomplete Y Y Y Javascript, Python, VBScript Jira, Azure, Git, Jenkins Starting at €5,170
Ranorex Y Y Y VB.NET, C# Azure, TestRail, Jenkins 4790 euro
LAMBDATEST Y Y Y Python, Java, Javascript, C-Sharp, Ruby, PHP JenkinsBambooTeamcityGITLAB CIetc.https://www.lambdatest.com/support/docs/integrate-azure-pipelines-with-lambdatest/ 99 euro per month (billed annually)1 Parallel Test (5 users)
XRay

Build

using UnityEditor;
using UnityEngine;

public class Build
{
    static void WebGLProductionBuild()
    {