Skip to content

Instantly share code, notes, and snippets.

View dominikjasek's full-sized avatar
:octocat:

Dominik Jašek dominikjasek

:octocat:
View GitHub Profile
@dominikjasek
dominikjasek / satisfies.ts
Last active June 28, 2023 11:47
satisfies
type Salaries = Record<string, number>;
const salaries: Salaries = {
John: 100,
};
salaries.adsasddas; // ❌ typescript won't yell at us
const salariesStrict = {
John: 100,
@dominikjasek
dominikjasek / arrow-vs-normal.js
Last active July 4, 2023 15:20
Arrow vs normal function in javascript
// paste to the console
let me = {
fullName: "Dominik Jasek",
thisInArrow: () => {
console.log("fullName inside arrow function:", this.fullName); // no 'this' binding here
},
thisInRegular() {
console.log("fullName inside regular function:", this.fullName); // 'this' binding works here
},
@dominikjasek
dominikjasek / @strapi+admin+4.4.6.patch
Last active December 31, 2023 15:11
Responsive @strapi/admin patch
diff --git a/node_modules/@strapi/admin/admin/src/components/LeftMenu/index.js b/node_modules/@strapi/admin/admin/src/components/LeftMenu/index.js
index 23b936b..8042d01 100644
--- a/node_modules/@strapi/admin/admin/src/components/LeftMenu/index.js
+++ b/node_modules/@strapi/admin/admin/src/components/LeftMenu/index.js
@@ -39,7 +39,7 @@ const LinkUser = styled(RouterNavLink)`
&:hover {
background: ${({ theme, logout }) =>
- logout ? theme.colors.danger100 : theme.colors.primary100};
+ logout ? theme.colors.danger100 : theme.colors.primary100};