written tutorial - useRef hook in React
27 Jul, 2022
The useRef Hook allows you to persist values between renders. First example would be to use the hook to update values without causing the component to re-render.
snippet - useEffect hook in React
26 Jul, 2022
React hook useEffect is used in functional components to implement life-cycle callbacks. The Effect Hook lets you perform side effects in function components, but some people argue that DOM events...
snippet - useState hook in React
25 Jul, 2022
useState is a hook what you use in a React function to create a state variable. This is not used if you use React class components. useState has tricks you must know about.
snippet - Dividing Symbol Values in PineScript
29 Jun, 2022
Snippet showing how to do division in PineScript. First I import close data from security, then divide the values by 1000 and print it out as a line on the chart. You can change the formula or use...
snippet - Remove orphaned packages Arch Linux
24 Jun, 2022
Remove orphaned packages in Arch Linux. When you install a package, you get it with dependencies. When you remove the package, dependencies stay there. So you can use this command to remove all...
snippet - Wifi through terminal in Arch Linux
24 Jun, 2022
Simple guide how to turn on wifi in command line. If you don't have the packages and can only connect through wifi you need to use the bootable usb. This is how you can make it work on your installed...
snippet - TypeScript: Error when loading image (png)
18 Jun, 2022
In react you can import image and use it in JSX, so that the compiler knows to load the asset. Apparently by default TypeScript doesn't support image files to be loaded. So you have to add new...
snippet - Show Logo image on AppBar in Material UI
18 Jun, 2022
Most sites or apps show a logo on the left corner of the screen. In Material ui there is AppBar component. The official examples don't have this snippet. Link to the official documentation: https://...
snippet - Install Preact
12 Jun, 2022
Installing Preact two ways shown. At first the official way did not work for me. I had to fix permissions for the global node modules, official solution. Then the alternative way worked, and after...
snippet - Open eml files in Linux
26 May, 2022
MPack will extract eml container file into txt and attachments separately. MPack is a C implementation of an encoder and decoder for the MessagePack serialization format. -f Force overwriting of...