Skip to content

Instantly share code, notes, and snippets.

View sinsunsan's full-sized avatar

Sébastien LUCAS sinsunsan

View GitHub Profile
@sinsunsan
sinsunsan / comfyui_setup.sh
Created February 20, 2025 10:21 — forked from ryanontheinside/comfyui_setup.sh
Deploying ComfyUI on RunPod
#You only need to run this script once. However, when you start a new runpod server, you will need to initialize conda in the shell.
#1. run the following command to intialize conda in the shell
#/workspace/miniconda3/bin/conda init bash
#2. run the following command to activate the conda environment
#conda activate comfyui
#3. run the following command to start comfyui
#python main.py --listen
#!/bin/bash
#ComfyUI single environment setup
{
"data": {
"query": {
"c_nature": "0",
"c_artist": "0",
"c_interm": "0",
"c_devise": "1"
},
"type": "years",
"series": [
@sinsunsan
sinsunsan / chatgpt-preprompt-06-12-2024
Created December 6, 2023 15:32
You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture.
You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture.
####
Knowledge cutoff: 2023-04
Current date: 2023-12-06
Image input capabilities: Enabled
# Tools
@sinsunsan
sinsunsan / .stylerc.json
Created February 4, 2020 10:16
Default style lint config
{
"extends": "stylelint-config-recommended-scss",
"rules": {
"selector-pseudo-element-no-unknown": [
true,
{
"ignorePseudoElements": [
"ng-deep"
]
}
tdLines.forEach((line, index) => {
switch (true) {
// you can use any condition here
case this.isLineNotReadyToUse(line):
linesNotReadyToUseCount++;
break;
case this.isPartNumberDuplicated(line, index, tdLines):
duplicatedPartsCount++;
break;
case partNumberAssociatedData &&
@sinsunsan
sinsunsan / alternative-switch.js
Created August 5, 2019 13:28
alternative switch not evaluating the value of switched variable
lines.forEach((line, index) => {
switch (true) {
// the this.isACondition return true and will be evaluated o not otherwise won't be
case this.isACondition(line):
doSomething++;
break;
case this.isAnOtherCondition(line):
doElseThing++;
break;
case this.somethingElseThatReturnTrueOrFalse(line, index):
import { Component } from '@angular/core';
import { ICellRendererAngularComp } from 'ag-grid-angular/main';
import { ICellRendererParamsExtended } from '../../../models/i-cell-renderer-params-extended.model';
@Component({
selector: 'gfec-simple-list',
templateUrl: './select-cell-renderer.component.html',
styleUrls: ['./select-cell-renderer.component.scss'],
})
@sinsunsan
sinsunsan / typescript-function.types.ts
Created July 12, 2018 13:48
add function types with typescript
/**
* Hide a column if the column field
* belongs to applicability hidden by default columns
*/
processLeaf(
colDef: ColDef,
columnsSelection: string[],
leafProcess: (visible: boolean, colDef: ColDef) => ColDef
) {
let colDefChanged: ColDef;
@sinsunsan
sinsunsan / my visual studio settings.js
Last active July 12, 2018 12:36
visual studio updated
{
"gitlens.advanced.messages": {
"suppressShowKeyBindingsNotice": true
},
"editor.minimap.enabled": false,
"window.zoomLevel": 0,
"editor.wordWrap": "on",
"explorer.confirmDragAndDrop": false,
"gitlens.advanced.messages": {
"suppressShowKeyBindingsNotice": true
@sinsunsan
sinsunsan / gist:218896b4ea0351a357286f3c45382fb5
Created May 17, 2018 09:40
visual-studio-code.user-settings
{
"editor.formatOnSave": true,
"editor.tabSize": 2,
"sasslint.enable": true,
"editor.minimap.enabled": false,
"explorer.confirmDragAndDrop": false,
"window.zoomLevel": 0,
"editor.wordWrap": "on",
}