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
# A safety wrapper for git reset commands | |
# Prompts for confirmation before executing potentially destructive reset operations | |
# Usage: Just use git reset or git reset --hard as normal, it will ask for confirmation (y/n) | |
function git() { | |
if [ "$1" = "reset" ]; then | |
if [ "$2" = "--hard" ]; then | |
echo -n "Are you sure you want to execute 'git reset --hard'? (y/n): " | |
read REPLY | |
if [[ $REPLY =~ ^[Yy]$ ]]; then | |
command git "$@" |
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 hashlib | |
from functools import lru_cache | |
from json.decoder import JSONDecodeError | |
from typing import Any, Dict, Optional, Type | |
from fastapi import Request | |
from sqlalchemy import select | |
from libs.db import get_db_session | |
from libs.exceptions import ErrorCode | |
from libs.models import Operator | |
class SignatureService: |
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 threading | |
import time | |
import requests | |
# Set the URL to send requests to (choose a test server or an address that responds quickly) | |
URL = "https://httpbin.org/get" | |
# Total number of requests to be made | |
NUM_REQUESTS = 1000 | |
NUM_THREADS = 50 |
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
{"name":"vscode","settings":"{\"settings\":\"{\\n \\\"editor.cursorBlinking\\\": \\\"smooth\\\",\\n \\\"files.autoSave\\\": \\\"onFocusChange\\\",\\n \\\"editor.fontSize\\\": 14,\\n \\\"editor.fontFamily\\\": \\\"JetBrainsMono Nerd Font Propo\\\",\\n \\\"terminal.integrated.fontFamily\\\": \\\"JetBrainsMono Nerd Font Propo\\\",\\n \\\"files.trimTrailingWhitespace\\\": true,\\n \\\"workbench.editor.highlightModifiedTabs\\\": true,\\n \\\"workbench.iconTheme\\\": \\\"eq-material-theme-icons-palenight\\\",\\n \\\"python.analysis.addImport.exactMatchOnly\\\": true,\\n \\\"python.analysis.autoFormatStrings\\\": true,\\n \\\"python.analysis.addImport.heuristics\\\": true,\\n \\\"python.analysis.autoImportCompletions\\\": true,\\n \\\"python.analysis.extraCommitChars\\\": true,\\n \\\"python.terminal.activateEnvInCurrentTerminal\\\": true,\\n \\\"editor.minimap.maxColumn\\\": 70,\\n \\\"workbench.colorTheme\\\": \\\"Dracula Pro\\\",\\n \\\"indentRainbow.indicatorSty |
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
{ | |
"git.autofetch": true, | |
"workbench.iconTheme": "material-icon-theme", | |
"editor.formatOnSave": true, | |
"files.autoSave": "afterDelay", | |
"python.linting.pylintEnabled": true, | |
"python.linting.pylintArgs": [ | |
"--disable=C0111", | |
"--load-plugins=pylint_django,pylint_celery", | |
], |
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
git reset --hard commit_id | |
git push --force |
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
#include <stdio.h> | |
#include <time.h> | |
#include <stdlib.h> | |
#define N 10 | |
void selection_sort(int arr[], int size); | |
void swap(int arr[], int firstIndex, int secondIndex); | |
int main() | |
{ |
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 { Scrollbars } from 'react-custom-scrollbars'; | |
<Scrollbars | |
autoHide={false} | |
autoHeight={true} | |
style={{ height: 150 }} | |
> | |
// your component here |
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 azure.storage.blob import BlockBlobService | |
from azure.storage import AccessPolicy | |
accountName = "*" | |
accountKey = "*" | |
def containersToUnPublic(): | |
block_blob_service = BlockBlobService(account_name=accountName, |
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
{ | |
"afghanistan": "af", | |
"albania": "al", | |
"algeria": "dz", | |
"american samoa": "as", | |
"andorra": "ad", | |
"angola": "ao", | |
"antarctica": "aq", | |
"antigua and barbuda": "ag", | |
"argentina": "ar", |
NewerOlder