Skip to content

Instantly share code, notes, and snippets.

View HakamRaza's full-sized avatar
🚀
To the Mars !

HakamRaza HakamRaza

🚀
To the Mars !
View GitHub Profile
@raviagheda
raviagheda / github-action-ssh.md
Last active June 11, 2024 17:59
Github Action with EC2 using SSH
name: CI/CD counter app
on:
push:
branches: [ master ]
jobs:
#First we will see the application build or not , then we will deploy in EC2
build:
runs-on: ubuntu-latest
@marcosvpj
marcosvpj / vscode-remove-duplicate-lines.md
Last active March 22, 2024 13:41
How to remove duplicate lines in Visual Studio Code?

If the order of lines is not important##

Sort lines alphabetically, if they aren't already, and perform these steps:
(based on this related question: https://stackoverflow.com/q/1573361/3258851)

  1. Control+F

  2. Toggle "Replace mode"

  3. Toggle "Use Regular Expression" (the icon with the .* symbol)

@namishelex01
namishelex01 / Security Engineer - Interview Questions.md
Last active February 28, 2024 03:47
Cyber security engineer, Security Engineer, Security Analyst, Information Security Analyst and many more names

Core Information Security

  • What is information security and how is it achieved?

  • What are the core principles of information security?

  • What is the CIA triangle?

  • What is non-repudiation (as it applies to IT security)?

@blakethepatton
blakethepatton / Description.md
Last active November 7, 2023 09:37
Getting Mailhog running on a dev server (nginx, letsencrypt, ssl, ubuntu)

Get it running as a service

wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64

mv MailHog_linux_amd64 mailhog

chmod +x mailhog

sudo vi /etc/systemd/system/mailhog.service

@msanjaypandit
msanjaypandit / php-security.md
Last active March 4, 2022 19:55
[PHP-Security] #PHP #Security

PHP-Security

you are uploading the file use below code.

$file = basename(realpath($_GET['file']));

Avoid using mysql(i)_ extensions use PDO

filter_var($_REQUEST['search'], FILTER_SANITIZE_FULL_SPECIAL_CHARS);

@zhujunsan
zhujunsan / Using Github Deploy Key.md
Last active June 4, 2024 10:08
Using Github Deploy Key

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@weapp
weapp / nginx.conf
Created August 4, 2014 17:21
Return common errors as json in Nginx
error_page 500 /500.html;
location /500.html{
return 500 '{"error": {"status_code": 500,"status": "Internal Server Error"}}';
}
error_page 502 /502.html;
location /502.html{
return 502 '{"error": {"status_code": 502,"status": "Bad Gateway"}}';
}
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References