Archive
Asar
Asar electron “tarball”
# Open terminal and install asar node module globally
$ npm install -g asar
# Go into the app’s directory, in our case it’s Slack
$ cd /Applications/Slack.app/Contents/Resources
# Create a directory to paste the content of app
$ mkdir example-sourcecode
# Unpack the app.asar file in the above directory using asar
$ asar extract app.asar example-sourcecode
# Boom cd into it and see the source code of the app
Redux, Selectors
Always use a selector to get state from components.
export const getAudio = (state) => {
return {
audio_folder: state.audio_folder,
playing: state.playing
}
}
Linux, Debian remove / stop service
To stop a service
sudo service servicename stop
To disable service autostart
sudo update-rc.d servicename disable
Git prevent from asking username and password everytime
Don’t use HTTP use SSH instead
change
https://github.com/WEMP/project-slideshow.git
to
[email protected]:WEMP/project-slideshow.git
you can do it in .git/config file
.bat file to remove unused drivers files and more
This is the code for the .bat file to clean DriverStore folder in Windows
@echo off
for /L %%A in (1,1,300) do (
echo Deleting OEM%%A.INF
pnputil /d OEM%%A.INF
)
Clean the WinSxS folder, run these command in cmd (Admin)
Dism.exe /online /Cleanup-Image /StartComponentCleanup
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
Dism.exe /online /Cleanup-Image /SPSuperseded