Skip to content

Instantly share code, notes, and snippets.

View majidux's full-sized avatar
🎯
Focusing

Majid Darvishnejad majidux

🎯
Focusing
View GitHub Profile
donwload vDos and masm
https://www.vdos.info/download.html
https://allameh.info/masm/
install vdos and copy all content inside masm.zip into vdos folder which they are usualy in this directory: C:\vDos\masm
also put your *.asm file inside this drirectory
open vdos app and enter 0
npm install --dev cross-env @next/bundle-analyzer
// next config file
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true'
})
module.exports = withBundleAnalyzer({})
"analyze": "cross-env ANALYZE=true next build",
rustup default stable-x86_64-pc-windows-gnu
@majidux
majidux / docker
Last active July 7, 2021 05:51
Here lies docker commands for postgresql
docker pull postgres
// run postgres container
docker run --name mypg -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres
// root access to potgres
psql -U postgres
// see roles
\du
@majidux
majidux / bad practice
Last active February 3, 2021 11:11
isIsogram
function isIsogram(str) {
const k = str.toLowerCase();
const splitted = k.split('');
const sorted_arr = splitted.slice().sort();
let results = [];
for (let i = 0; i < sorted_arr.length - 1; i++) {
if (sorted_arr[i + 1] === sorted_arr[i]) {
results.push(sorted_arr[i]);
}
}
@majidux
majidux / sentence_reverse
Created February 1, 2021 11:54
Reverting words in a sentence
const reverseWords = (str: string): string => {
const splitArr: string[] = str.split(' ');
const words: string[] = splitArr.map((i) => {
return i.split('').reverse().join('');
});
return words.join(' ');
};