Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

🛠️ Comment se connecter à la base de données pour un bot utilisant MySQL

Sur un ordinateur local

Tout d'abord, veuillez installer Xampp via ce lien qui est totalement sécurisé et gratuit: XAMPP.

Une fois que vous avez téléchargé et lancé l'application, vous arriverez sur ce tableau de bord. Veuillez cliquer sur les boutons encadrés en rouge :

@david-marconis
david-marconis / wsl-vpnkit-guide.md
Last active April 23, 2024 09:57
WSL vpn-kit quick guide with systemd
@ryanlintott
ryanlintott / CustomColorScheme.swift
Last active April 23, 2024 09:54
Custom color scheme view modifier for SwiftUI. Sets the color scheme to light mode, dark mode, or matches the system. If set to match, the app will respond to system-wide color scheme changes properly. A simple widget color scheme implementation is also provided.
import SwiftUI
enum CustomColorScheme: Int, CaseIterable, Identifiable, Codable {
static var defaultKey = "customColorScheme"
static var defaultValue = CustomColorScheme.system
case system = 0
case light = 1
case dark = 2
@dhh
dhh / linux-setup.sh
Last active April 23, 2024 09:53
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl docker.io \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
git clone https://github.com/OpenDevin/OpenDevin.git
cd OpenDevin
conda create -n od python=3.10
conda activate od
docker ps
(optional) install docker if not already installed
docker pull ghcr.io/opendevin/sandbox
export OPENAI_API_KEY={your key}
(optional I had to install rust) curl --proto '=https' --tlsv1.2 -sSf [https://sh.rustup.rs](https://sh.rustup.rs/) | sh
(optional) restart terminal
@Ikki-Dai
Ikki-Dai / SpringDataJdbcConfiguration.java
Last active April 23, 2024 09:52
CustomerEnumConverter
@Configuration
@Slf4j
public class SpringDataJdbcConfiguration extends AbstractJdbcConfiguration {
@Override
public JdbcCustomConversions jdbcCustomConversions() {
return new JdbcCustomConversions(Arrays.asList(Enum2Integer.INSTANCE,
new Integer2Enum<>(Account.Gender.class)));
}
@barrysteyn
barrysteyn / Base64Decode.c
Last active April 23, 2024 09:50
Base64 Encoding/Decoding with the OpenSSL c api
//Decodes Base64
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <string.h>
#include <stdio.h>
int calcDecodeLength(const char* b64input) { //Calculates the length of a decoded base64 string
int len = strlen(b64input);
int padding = 0;
@JoeyBurzynski
JoeyBurzynski / crawler-user-agent-strings-with-descriptions.txt
Created October 22, 2018 16:25
Bot & Crawler User Agents Strings with Descriptions
Googlebot/2.1 (+http://www.google.com/bot.html) # Pattern: Googlebot\/ / URL: http://www.google.com/bot.html
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) # Pattern: Googlebot\/ / URL: http://www.google.com/bot.html
Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) # Pattern: Googlebot\/ / URL: http://www.google.com/bot.html
Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/537.36 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) # Pattern: Googlebot\/ / URL: http://www.google.com/bot.html
Mozilla/5.0 (iPhone; CPU iPhone OS 8_3 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12F70 Safari/600.1.4 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) # Pattern: Googlebot\/ / URL: http://www.google.com/bot.html
Mozilla
@joerodgers
joerodgers / Get-KeyVaultSecret.ps1
Last active April 23, 2024 09:44
Example using REST and PowerShell to retrieve a secret from Azure Key Vault via AAD Service Principal credential
function Get-AccessToken
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true,ParameterSetName='Resource')]
[Parameter(Mandatory=$true,ParameterSetName='Scope')]
[string]$ClientId,
[Parameter(Mandatory=$true,ParameterSetName='Resource')]