Skip to content

Instantly share code, notes, and snippets.

View SMUsamaShah's full-sized avatar
🎯
Focusing ... almost

Muhammad Usama SMUsamaShah

🎯
Focusing ... almost
View GitHub Profile
import torch
import modules.scripts as scripts
import gradio as gr
from modules.script_callbacks import on_cfg_denoiser
from modules import processing
class Script(scripts.Script):
def title(self):
@lboulard
lboulard / README.md
Last active December 7, 2023 19:13
Fancy clink #windows #dotfiles

Moved to repo: /quenhus/uBlock-Origin-dev-filter

In order to keep filters up to date, please use this repo.

@iTrooz
iTrooz / main.py
Last active January 5, 2024 00:57
reMarkable 2 splash.dat converter
#!/usr/bin/env python3
"""
This script aims at converting an image to the custom format used by Remarkable 2
After running this script, move the output "splash.dat" file to /var/lib/uboot in the rM2 device
I tried this with PNG images but I guess other formats should work too since I use PIL
Syntax: ./main.py <file> [-x xOffset] [-y yOffset]
(-x and -y are the offsets of the image on the screen. If not set, the image will be centered on the screen)
Input images may need to be rotated 90 degrees before converting them
Licence: MPL 2.0
"""
@rupeshtr78
rupeshtr78 / fzf_history.lua
Last active May 26, 2024 19:27
Windows FZF history search with cmder ,clink
-- fzf clink history search
-- update cmder\vendor\clink >= clink -- version = 1.1.44
-- install fzf choco install fzf
-- add the fzf_history.lua to cmder\config folder
-- add below key binding to _inputrc use "clink info" to find inputrc path
-- M-x: "luafunc:fzf_history" #Alt x
-- Might have to adjust your regex in line 38 39 based on your settings
-- reference https://chrisant996.github.io/clink/clink.html
settings.add("fzf.height", "40%", "Height to use for the --height flag")
@dbellomo
dbellomo / off-grid.md
Last active December 17, 2023 17:04
servicios, aplicaciones sin conexión a Internet. offline-first.
@jrodbx
jrodbx / task_graph.groovy
Last active September 8, 2022 18:29
Graphviz visualization of a Gradle project's task graph
gradle.taskGraph.whenReady {
println "rootProject: " + rootProject.name
println "childProjects: " + rootProject.childProjects
def dot = new File(rootProject.buildDir, 'project.dot')
dot.delete()
def command = "./gradlew " + gradle.startParameter.getTaskNames().join(" ")
println "command: " + command
@palashkulsh
palashkulsh / epub_to_pdf
Last active August 11, 2021 22:35
how to convert epub to pdf
sudo apt-get install calibre
ebook-convert file.epub file.pdf
# python3 version, derived from python2 version https://gist.github.com/dergachev/7028596
#
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python3 simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
@dikiaap
dikiaap / git-io-custom-url.md
Last active May 7, 2024 17:34
git.io custom URL

Update: As of 11 January 2022, git.io no longer accepts new URLs.

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com