Skip to content

Instantly share code, notes, and snippets.

View par4dise's full-sized avatar

Sébastien Paradis par4dise

View GitHub Profile
@par4dise
par4dise / forkatppuccin.omp.json
Last active June 23, 2023 14:06
forkatppuccin
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"palette": {
"os": "#ACB0BE",
"pink": "#F5BDE6",
"lavender": "#B7BDF8",
"blue": "#8AADF4",
"wight": "#FFFFFF",
"text": "#494D64"
},
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#61AFEF",
"foreground": "#ffffff",
"leading_diamond": "\ue0b6",
@par4dise
par4dise / BsonClassMapHelper.cs
Last active February 5, 2020 14:12 — forked from andreabalducci/BsonClassMapHelper.cs
Reset class map for unit testing
using System;
using System.Collections.Generic;
using System.Reflection;
using MongoDB.Bson.Serialization;
namespace Mongo.Gist
{
/// <summary>
/// Class BsonClassMapHelper.
/// </summary>
@par4dise
par4dise / Mongo replica sets on Windows
Created January 7, 2020 15:38
Mongo replica sets on Windows
@echo OFF
docker network create mongo-cluster
REM create mongos
echo Start MongoDB servers
docker run --rm -h mongo1 -d --net mongo-cluster -p 27017:27017 --name mongo1 mongo mongod --replSet mongo-replicaset --port 27017
docker run --rm -h mongo2 -d --net mongo-cluster -p 27018:27018 --name mongo2 mongo mongod --replSet mongo-replicaset --port 27018
docker run --rm -h mongo3 -d --net mongo-cluster -p 27019:27019 --name mongo3 mongo mongod --replSet mongo-replicaset --port 27019
@par4dise
par4dise / local-mongo-replicaset-with-docker
Created January 6, 2020 11:03 — forked from oleurud/local-mongo-replicaset-with-docker
[Local mongo replicaset with docker] #docker #mongo
# pull the official mongo docker container
docker pull mongo
# create network
docker network create my-mongo-cluster
# create mongos
docker run -d --net my-mongo-cluster -p 27017:27017 --name mongo1 mongo mongod --replSet my-mongo-set --port 27017
docker run -d --net my-mongo-cluster -p 27018:27018 --name mongo2 mongo mongod --replSet my-mongo-set --port 27018
docker run -d --net my-mongo-cluster -p 27019:27019 --name mongo3 mongo mongod --replSet my-mongo-set --port 27019
@par4dise
par4dise / rsync use.md
Last active October 5, 2017 14:21
rsync

rsync use

Options

-a all (symlinks, etc)
-r recursive
-n SIMULATION
-v verbose
--delete mirror removed files on dest
--exclude=._* remove mac hidden files such as "._DSSTORE"

Simulation

@par4dise
par4dise / How to assign a PNG from TPngImageList
Last active September 19, 2016 20:21
TPngImageList to TImage or TPngBitBtn
Assign to a TPngBitBtn
----------------------
myPngBitBtn.PngImage := imageList.PngImages.Items[0].PngImage
Assign to a TImage
------------------
imageList.GetBitmap(0, myImage.Picture.Bitmap)