Skip to content

Instantly share code, notes, and snippets.

View ShinobiWPS's full-sized avatar
🥷
Working from *

Alexandru Gherasim ShinobiWPS

🥷
Working from *
View GitHub Profile
@ShinobiWPS
ShinobiWPS / hibernate_with_timer.bat
Last active December 7, 2022 11:38
Windows one-line hibernate with timeout
timeout /t SECONDS /nobreak & shutdown -h
@ShinobiWPS
ShinobiWPS / Git usefull commands :).md
Last active January 19, 2024 11:24
Git usefull commands :).md

Forcefully apply local changes to the origin

If the commit has already been pushed and the changes need to be applied to the remote source (aka origin): the origin implies the remote branch of the current local one you are on

git push origin --force-with-lease #this will OVERWRITE the GIT history only if no one else has pushed something before you

Delete a local branch

git branch -d the_local_branch

@ShinobiWPS
ShinobiWPS / functions-utils-utilities-utility.js
Last active October 7, 2025 10:13
react , vue ,functions
async function catchError<T>(promise: Promise<T>): Promise<[undefined,T] | [Error]> {
try {
const data = await promise
return [undefined, data] as [undefined, T]
} catch (error) {
return [error]
}
}
export const getUrlParams = (params) => {
@ShinobiWPS
ShinobiWPS / ShinobiWPS-Unity_WebGL_tips.txt
Last active August 29, 2022 16:14
ShinobiWPS - Tips to optimize a WebGL build of a Unity game
http://docs.unity3d.com/Manual/webgl-building.html
http://docs.unity3d.com/Manual/ReducingFilesize.html
https://www.youtube.com/watch?v=gVUgF2ZHveo - AssetBundles
Webgl game size Info:
When we compile a Webgl project,it generates 3 folders along with html file.
Compressed
Release
TemplateData