Skip to content

Instantly share code, notes, and snippets.

//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@ozh
ozh / gist:4131243
Created November 22, 2012 13:44
Create dot files/directories (ie .file) on Windows

#How to create a .file or .folder on Windows

There are several ways

1. Rename

  • Create file.txt
  • Rename to .file., the last dot will be dropped, you'll have .file

Works the same with a file or a directory.

@Xenthys
Xenthys / ShareXen.md
Last active October 8, 2018 22:02
ShareXen - Another ShareX Custom Uploader PHP Script
@Xenthys
Xenthys / sharexen.sh
Last active July 12, 2022 11:55
Shell convenience script for ShareXen
#!/bin/sh
# Shell convenience script for ShareXen
# Source: https://github.com/Xenthys/ShareXen
# GNU/Linux dependencies: jq curl maim xclip notify-send
# - jq: parse ShareXen API JSON results
# - curl: query the ShareXen API itself
# - maim: take screenshots
# - xclip: copy URL to clipboard
@botatooo
botatooo / sharex_history_cleaner.py
Last active September 17, 2022 05:23
remove dead links from history. download the script to the sharex folder and run it
import json
import sys
import urllib.request
from urllib.error import HTTPError, URLError
from datetime import datetime
HISTORY_PATH = ".\\History.json"
with open(HISTORY_PATH, "r") as f:
# backup
'''
https://gist.github.com/kohya-ss/3f774da220df102548093a7abc8538ed
1. put this file in ComfyUI/custom_nodes
2. load node from <loaders>
'''
import torch
from comfy.ldm.modules.diffusionmodules.openaimodel import forward_timestep_embed, timestep_embedding, th
def apply_control(h, control, name):