Skip to content

Instantly share code, notes, and snippets.

View TheTharz's full-sized avatar
💻
Simmering ideas into code

Tharindu Jayawardhana TheTharz

💻
Simmering ideas into code
View GitHub Profile
@TheTharz
TheTharz / how_to_install_mingw_on_windows_machine.md
Last active October 29, 2025 09:11
Installing and setting up mingw in windows

Steps to Download and Set Up MinGW On Windows Machine:

  1. Download MinGW

  2. Extract the ZIP File

    • After downloading, extract the contents of the ZIP file to a folder of your choice.
    • Move the extracted folder to C:\ (e.g., C:\winlibs-x86_64-posix-seh-gcc-14.2.0-mingw-w64msvcrt-12.0.0-r3).
  3. Find gcc.exe

@TheTharz
TheTharz / type this in command line
Created March 18, 2024 06:11
resetting wsl password for root user
cd in to below directory
cd C:\users\<username>\AppData\Local\Microsoft\WindowsApps
change the user to root
<linuxdistro>.exe config --default-user root
open wsl and now the user will be root
passwd <default_username>
execute this in the above directory and change default user to your user
@TheTharz
TheTharz / HashRouter
Last active December 8, 2023 11:38
Electronjs BrowserRouter not working properly
Use hashRouter instead of the BrowserRouter
import { HashRouter as Router, Routes, Route } from 'react-router-dom';
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement
);
root.render(
<React.StrictMode>
{/* <App /> */}
@TheTharz
TheTharz / firebase-auth-invalid-cert-hash
Last active January 16, 2024 04:03
When there is an firebase_auth/invalid-cert-hash
go to <project>\build\app\outputs\apk\debug
in a cmd
keytool -printcert -jarfile app-debug.apk
sha-1 copy then
go to firebase and project overview then go to the connected apps
click the setting icon in android
paste the sha1 as a new fingerprint
for ios setup https://www.youtube.com/watch?v=k7TVYn5jwQk
go to googleservices-info.plist in ios/runner
then get the reverse client id
@TheTharz
TheTharz / Gitbash
Created August 14, 2023 01:10
gitbash code for compile and run
----for compile
g++ -o output_filename input_filename.cpp
----for running the code
./output_filename
npm config set https-proxy http://10.50.225.222:3128
npm config set proxy http://10.50.225.222:3128
npm config delete proxy
npm config delete https-proxy
vscode proxi
http://10.50.225.222:3128
git config --global http.proxy http://10.50.225.222:3128
git config --global https.proxy https://10.50.225.222:3128
git config --global --unset http.proxy
git config --global --unset https.proxy