Skip to content

Instantly share code, notes, and snippets.

Working on projects

David Refoua DRSDavidSoft

Working on projects
View GitHub Profile
View adsremover-init.js
!function(a,d,s,f,u,c,k){var sentinel = function(){var e,n,t,i=Array.isArray,r={},o={};return{on:function(a,s){if(s){if(!e){var f=document,l=f.head;f.addEventListener("animationstart",function(e,n,t,i){if(n=o[e.animationName])for(e.stopImmediatePropagation(),t=n.length,i=0;i<t;i++)n[i](},!0),e=f.createElement("style"),l.insertBefore(e,l.firstChild),n=e.sheet,t=n.cssRules}(i(a)?a:[a]).map(function(e,i,a){(i=r[e])||(a="!"==e[0],r[e]=i=a?e.slice(1):"sentinel-"+Math.random().toString(16).slice(2),t[n.insertRule("@keyframes "+i+"{from{transform:none;}to{transform:none;}}",t.length)]._id=e,a||(t[n.insertRule(e+"{animation-duration:0.0001s;animation-name:"+i+";}",t.length)]._id=e),r[e]=i),(o[i]=o[i]||[]).push(s)})}},off:function(e,a){(i(e)?e:[e]).map(function(e,i,s,f){if(i=r[e]){if(s=o[i],a)for(f=s.length;f--;)s[f]===a&&s.splice(f,1);else s=[];if(!s.length){for(f=t.length;f--;)t[f]._id==e&&n.deleteRule(f);delete r[e],delete o[i]}}})},reset:function(){r={},o={},e&&e.parentNode.removeChild(e),e=0}}}(document)
DRSDavidSoft /
Last active Dec 9, 2021
Microsoft Error Issues


There is an increasingly annoying trend among many development tools nowadays to intentionally omit useful information when displaying an error message to the end-user. It has become a habit for developers behind many popular software, where they would actively try to hide such information from the user.

This also includes Microsoft products.

I don't agree with these kinds of desicions; and in contrast to what the product designers might perceive, I believe the actions to hide information to be a bad UX design.

While there might be several reasons as to why this might be useful (removing sensitive information, etc),

DRSDavidSoft / validateNID.js
Last active Feb 16, 2020
Example js code to validate Iran's National ID also known as the Code Melli – کد نمونه جاوا اسکریپت برای بررسی صحت و تأیید کد ملی.
View validateNID.js
* Example Javascript snippet to validate Iran's National ID (Code Melli)
* David Refoua <>
function validateNID( code )
var str = code.toString();
// validate the string length and value
DRSDavidSoft / git_branches
Created Feb 1, 2020
Working with git branches
View git_branches
# fetch upstream branches
## git fetch upstream
# create local branch test from upstream master
git checkout -b test upstream/master
# do some stuff
git add src
git commit -m "did some stuff"
DRSDavidSoft / Monokai.flutecolors
Created Jan 30, 2019
Monokai Color Scheme for FluentTerminal/Cmder
View Monokai.flutecolors
"Name": "Monokai",
"Author": "David Refoua <>",
"Colors": {
"Foreground": "#F8F8F0",
"Background": "#282828",
"Cursor": "#f8f8f0",
"CursorAccent": "#272822",
"Selection": "rgba(73, 72, 62, 0.3)",
"Black": "#2E3436",
DRSDavidSoft / cmder-bash.bat
Created Feb 25, 2018
Starts cmder+cygwin from context menu
View cmder-bash.bat
@echo off & cd /d %0\..
set PWD=%~1
set CMDER_ROOT=C:\development\cmder
set CYGWIN_ROOT=C:\development\cygwin
set BASH_COMMAND=pushd "%CYGWIN_ROOT%" ^& "%CYGWIN_ROOT%\bin\bash" --login -i -c 'cd "`cygpath -au \"%PWD:\=/%\"`"; exec bash' ^& popd
set CONEMU_SWITCHES=-new_console:m:/mnt -new_console:a
start "Cygwin Shell" %CMDER_ROOT%\vendor\conemu-maximus5\ConEmu.exe /icon "%CYGWIN_ROOT%\bin\mintty.exe" /title Bash /loadcfgfile "%CMDER_ROOT%\config\ConEmu.xml" /cmd cmd /c "%BASH_COMMAND%" %CONEMU_SWITCHES%