wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
sudo apt update && sudo apt install vagrant
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"آذربایجان شرقی": [ | |
"آبش احمد", | |
"آچاچی", | |
"آذرشهر", | |
"آقکند", | |
"اسکو", | |
"اهر", | |
"ایلخچی", | |
"باسمنج", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from pymongo import MongoClient | |
db = MongoClient().get_database('panther') | |
prev_connections = None | |
while True: | |
status = db.command("serverStatus") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const movies = [ | |
movie1 = { | |
Name: "ghosted", | |
Genre: "action", | |
IMDB: 8.3, | |
Year: 2023 | |
}, | |
movie2 = { | |
Name: "sakhteman pezashhkan", | |
Genre: "comedy", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
class CustomHandler: | |
""" | |
Handler that controls the writing of the newline character | |
""" | |
special_code = "[!n]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "print('You Have Not Been Hacked.')" >> /tmp/startup.log && echo "export PYTHONSTARTUP=/tmp/startup.log" >> ~/.bashrc && source ~/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
from rest_framework.status import HTTP_404_NOT_FOUND | |
from rest_framework.exceptions import APIException | |
class BaseManager(models.Manager): | |
def get_or_raise(self, *args, **kwargs): | |
queryset = super().get_queryset() | |
try: | |
return queryset.get(*args, **kwargs) | |
except queryset.model.DoesNotExist: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from pathlib import Path | |
from celery import Celery | |
from dotenv import dotenv_values | |
BASE_DIR = Path(__file__).resolve().parent.parent | |
env = dotenv_values(BASE_DIR / '.env') | |
REDIS_HOST = env['REDIS_HOST'] | |
REDIS_PORT = env['REDIS_PORT'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
version=4.16 | |
wget https://github.com/rofl0r/proxychains-ng/archive/v$version.tar.gz | |
tar xf v$version.tar.gz | |
(cd proxychains-ng-$version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shlex | |
import base64 | |
import subprocess | |
import fitz # PyMuPDF | |
from uuid import uuid4 | |
from fastapi import FastAPI | |
from pydantic import BaseModel | |
from PIL import Image, ImageDraw, ImageFont |
NewerOlder