Skip to content

Instantly share code, notes, and snippets.

View ciamac-da's full-sized avatar
🦖
<Läuft bei mir! />

Cia ciamac-da

🦖
<Läuft bei mir! />
View GitHub Profile
@ciamac-da
ciamac-da / 17-change-favicon-nextjs
Created April 14, 2024 21:49
Changing Favicon in Nextjs
// Add icons to Metadata function which is in layout file
export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
icons: {
icon: "./favicon.ico",
},
};
@ciamac-da
ciamac-da / 16-set-specific-node-npm-yarn-version.txt
Last active December 8, 2022 10:11
This is how to install and set a specific node/npm/yarn version on Mac
Note: I add an example as a pattern here, you just need to change the version number in case you want to have other versions!
1- Install NODE: nvm install 16.13.2
2- Make Installed version as default: nvm alias default 16.13.2
3- NPM: npm install [email protected] -g
3- YARN: yarn set version 1.22.19
@ciamac-da
ciamac-da / 15-XSS-Penetration-script.txt
Created June 16, 2022 07:56
XSS Penetration Model Script
<script>
const message = "This site has beend HACKED please fix your XSS issue!"
document.getElementByTagName("h1")[0].innerHTML = message
</script>
// This is how to upgrade Kali Linux to 2022.1
0- Open Terminal and find out which version of Kali Linux you have using ==> cat /etc/os-release
1- The second step is to check the repository file ==> cat /etc/apt/sources.list
2- Now upgrade your Kali Linux with ==> sudo apt upgrade
3- Now Upgrade fully your Kali Linux using ==> sudo apt full-upgrade -y
@ciamac-da
ciamac-da / 13-source control issue of vscode(v11).txt
Last active February 16, 2022 14:54
This is how to enable git source control for vscode v11
0- Open vscode
1- click on setting symbol and open settings
2- search for settings.json file and then open it
3- You have to add two commands to json file
"git.enabled": true,
"git.path": "/usr/bin/git"
*Note: You can type which git to find the correct git path!
@ciamac-da
ciamac-da / 12-install-java-on-windows10.txt
Last active January 24, 2022 17:53
This is how to install java on windows10
00- Open Internet Explorer icon and go to https://java.com/en/
01- Select the Free Java Download button, and then select Agree and Start Free Download. If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
02- On the notification bar, select Run. If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
03- Select Install > Close.
NOTE: If you're having problems installing or using Java, look for answers in the Java Help Center.
@ciamac-da
ciamac-da / gist-11-delete white space in javascript string using regex.txt
Last active January 9, 2022 23:17
This is how to get rid of white space in javascript string using regular expression
// This is how to get rid of white space in javascript string using regular expression
let cia = " cia is a lazy programmer "
let str = cia.replace(/^\s+|\s+$|\s+(?=\s)/g , "")
console.log(str) // Gives: cia is a lazy programmer
@ciamac-da
ciamac-da / gist-10-install-tor-browser-on-kali-linux.txt
Created July 14, 2021 18:12
This is how to install Tor browser on Kali Linux
1- sudo apt update
2- sudo apt install tor torbrowser-launcher -y
3- torbrowser-launcher
4- Click on connect to connect to Tor
Take a look at the documentation ==> https://www.torproject.org
@ciamac-da
ciamac-da / gist-09-github-deployment-react.txt
Last active September 1, 2021 10:33
This is how to deployment React projects on Github
1- Open package.json file and add a homepage at the top before name
==> "homepage": "https://<USERNAME>.github.io/<PROJECT NAME>",
2- install gh-pages using ==> npm i gh-pages
3- Add pre-deploy and deploy to scripts field in package.json file ==>
"pre-deploy": "npm run build",
"deploy": "gh-pages -d build"
4- type npm run pre-deploy in terminal
@ciamac-da
ciamac-da / gist-08-github-deployment-vanilla-javascript.txt
Last active July 11, 2021 12:13
Github Deployment for Vanilla JavaSript Repos
1- Add a new branch in your Project useing ==> git checkout -b gh-pages
2- Try to change at least one character of your project's files and save(you need this to be able to push again)
3- git add -A
4- git commit -am "deployment branch added"
5- git push --set-upstream origin gh-pages