Skip to content

Instantly share code, notes, and snippets.

@cubiq
cubiq / FLUX_Latent_Detailer.json
Last active October 22, 2024 10:56
FLUX dev Latent Space Detailer
{
"last_node_id": 469,
"last_link_id": 1401,
"nodes": [
{
"id": 16,
"type": "KSamplerSelect",
"pos": [
-280,
20
@ALEXOTANO
ALEXOTANO / stable-difusion-styles.csv
Last active April 28, 2024 12:06
List of Styles for Stable Difusion
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
name,prompt,negative_prompt
"Style: Enhance","breathtaking {prompt} . award-winning, professional, highly detailed","ugly, deformed, noisy, blurry, distorted, grainy"
"Style: Anime","anime artwork {prompt} . anime style, key visual, vibrant, studio anime, highly detailed","photo, deformed, black and white, realism, disfigured, low contrast"
"Style: Photographic","cinematic photo {prompt} . 35mm photograph, film, bokeh, professional, 4k, highly detailed","drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly"
"Style: Digital art","concept art {prompt} . digital artwork, illustrative, painterly, matte painting, highly detailed","photo, photorealistic, realism, ugly"
"Style: Comic book","comic {prompt} . graphic illustration, comic art, graphic novel art, vibrant, highly detailed","photograph, deformed, glitch, noisy, realistic, stock photo"
"Style: Fantasy art","ethereal fantasy concept art of {prompt} . magnificent, celestial, ethereal, painterly, epic, majestic, magic
@raysan5
raysan5 / raylib_vs_sdl.md
Last active November 14, 2024 18:25
raylib vs SDL - A libraries comparison

raylib_vs_sdl

In the last years I've been asked multiple times about the comparison between raylib and SDL libraries. Unfortunately, my experience with SDL was quite limited so I couldn't provide a good comparison. In the last two years I've learned about SDL and used it to teach at University so I feel that now I can provide a good comparison between both.

Hope it helps future users to better understand this two libraries internals and functionality.

Table of Content

@ace411
ace411 / scraper.cc
Created May 11, 2022 16:46
Web Scraping with C++
#include "iostream"
#include "string"
#include "algorithm"
#include "curl/curl.h"
#include "gumbo.h"
#include "string.h"
typedef size_t (*curl_write)(char *, size_t, size_t, std::string *);
std::string request(std::string word)
@AidanSun05
AidanSun05 / ImGuiDockspaceExample.cpp
Last active April 26, 2023 19:54
A modified DockSpace example for Dear ImGui. Changes are listed at the top of the file.
// CHANGES MADE:
// Added more clarifying comments inside the function.
// Removed MSVC warning C6011 - null pointer dereference.
// Fixed a slight grammar error - "This demo app only demonstrate" => "This demo app only demonstrates"
// Demonstrate using DockSpace() to create an explicit docking node within an existing window.
// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
// About dockspaces:
@cyrstem
cyrstem / f.frag
Created February 16, 2021 22:59
THREE js TO OF
#version 150
in vec4 verts;
out vec4 outputColor;
in float qnoise;
uniform float time;
uniform bool redHell;
uniform float r_color;
uniform float g_color;
uniform float b_color;
//in vec2 fragUV;
@moebiussurfing
moebiussurfing / ofApp.cpp
Last active August 16, 2022 08:44
openFrameworks | ofParameters callbacks using modern lambdas. Exclusive toggle bool's behaviour. ofParameterGroup different types filtetering / casting too.
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup(){
ofSetFrameRate(30);
listenerMouse = ofEvents().mousePressed.newListener([this](ofMouseEventArgs&mouse) {
ofLogNotice() << __FUNCTION__ << "mouse:"<<ofToString(mouse);
});
@Pikachuxxxx
Pikachuxxxx / ImGuiTransformUI.cpp
Last active October 14, 2024 07:40
ImGui Transform Component with RBG for XYZ than can be used for position, rotation and scaling components
void DrawVec3Control(const std::string& label, glm::vec3& values, float resetValue = 0.0f, float columnWidth = 100.0f)
{
ImGuiIO& io = ImGui::GetIO();
auto boldFont = io.Fonts->Fonts[0];
ImGui::PushID(label.c_str());
ImGui::Columns(2);
ImGui::SetColumnWidth(0, columnWidth);
ImGui::Text("%s", label.c_str());
@soufianekhiat
soufianekhiat / DearImGui.cpp
Last active April 16, 2024 19:03
Slider 2D & Slider 3D
bool InputVec2(char const* pLabel, ImVec2* pValue, ImVec2 const vMinValue, ImVec2 const vMaxValue, float const fScale /*= 1.0f*/)
{
return SliderScalar2D(pLabel, &pValue->x, &pValue->y, vMinValue.x, vMaxValue.x, vMinValue.y, vMaxValue.y, fScale);
}
bool InputVec3(char const* pLabel, ImVec4* pValue, ImVec4 const vMinValue, ImVec4 const vMaxValue, float const fScale /*= 1.0f*/)
{
return SliderScalar3D(pLabel, &pValue->x, &pValue->y, &pValue->z, vMinValue.x, vMaxValue.x, vMinValue.y, vMaxValue.y, vMinValue.z, vMaxValue.z, fScale);
}
@PossiblyAShrub
PossiblyAShrub / dock_builder_example.cpp
Created August 12, 2020 15:13
Simple example, of how to use the dock builder API. (Adapted from the dock space example in the demo window) You need to use the docking branch and set the ImGuiConfigFlags_DockingEnable config flag. Learn more about Dear ImGui here: https://github.com/ocornut/imgui
static ImGuiDockNodeFlags dockspace_flags = ImGuiDockNodeFlags_PassthruCentralNode;
// We are using the ImGuiWindowFlags_NoDocking flag to make the parent window not dockable into,
// because it would be confusing to have two docking targets within each others.
ImGuiWindowFlags window_flags = ImGuiWindowFlags_MenuBar | ImGuiWindowFlags_NoDocking;
ImGuiViewport* viewport = ImGui::GetMainViewport();
ImGui::SetNextWindowPos(viewport->Pos);
ImGui::SetNextWindowSize(viewport->Size);
ImGui::SetNextWindowViewport(viewport->ID);