Skip to content

Instantly share code, notes, and snippets.

View Chippd's full-sized avatar

Chris Dermody Chippd

View GitHub Profile
@Chippd
Chippd / gist:23ffa3c73f6bbf461b79bd04566f1659
Created January 20, 2025 19:37
Actual OP inpaint workflow for person transfer
{
"last_node_id": 89,
"last_link_id": 112,
"nodes": [
{
"id": 1,
"type": "Reroute",
"pos": [
18380.296875,
7197.654296875
{
"last_node_id": 185,
"last_link_id": 297,
"nodes": [
{
"id": 94,
"type": "PreviewImage",
"pos": [
3877.234130859375,
3700.50341796875
@Chippd
Chippd / SomeParentComponent.vue
Created December 19, 2024 10:17
Nuxt Captcha plugin (for /r/nuxt reply)
<template>
<!-- rest of component -->
<TheCaptcha
ref="captcha"
@verify="handleCaptchaVerify"
@error="handleCaptchaError"
@expired="handleCaptchaExpired"
@challengeExpired="handleCaptchaChallengeExpired"
@Chippd
Chippd / gist:d7f0072e8d2bf89b1903078813dfc63e
Created November 11, 2024 19:41
code sample of image deletion
// the actual fileId is in storage_data.fileId
const fileId = file.storage_data.fileId
console.log('fileId', fileId)
// Delete the file from ImageKit
try {
// Wrap the callback-based function in a Promise
await new Promise((resolve, reject) => {
imageKit.deleteFile(fileId, (error, result) => {
if (error) {
{
"last_node_id": 127,
"last_link_id": 214,
"nodes": [
{
"id": 97,
"type": "MZ_ChatGLM3_V2",
"pos": {
"0": 1573,
"1": 984,
{
"last_node_id": 130,
"last_link_id": 219,
"nodes": [
{
"id": 97,
"type": "MZ_ChatGLM3_V2",
"pos": {
"0": 1573,
"1": 984,
export default () => {
!function() {
var t = window.driftt = window.drift = window.driftt || [];
if (!t.init) {
if (t.invoked) return void (window.console && console.error && console.error("Drift snippet included twice."));
t.invoked = !0, t.methods = [ "identify", "config", "track", "reset", "debug", "show", "ping", "page", "hide", "off", "on" ],
t.factory = function(e) {
return function() {
@Chippd
Chippd / backgroundImageSizes.js
Last active September 21, 2017 14:55
find out how wide and high you need your background images need to be on a responsive layout
// for each div on page with a background image
// show a label in its top right corner with the max height and width values
// When page is resized, calculate
// create size display element
let sizeDisplayStyles = "style='position: absolute;top: 0;right: 0;padding: 10px;background: navajowhite;'";
let displayEl = `<span class='sizeDisplay' ${sizeDisplayStyles} data-w="0" data-h="0" >waiting for page resize...</span>`
function magic () {
@Chippd
Chippd / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">