Skip to content

Instantly share code, notes, and snippets.

View ssube's full-sized avatar

Sean Sube ssube

View GitHub Profile
# Script for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint.
# *Only* converts the UNet, VAE, and Text Encoder.
# Does not convert optimizer state or any other thing.
# Written by jachiam
import argparse
import os.path as osp
import torch
/*
Random crystal generator for Thingiverse Customizer
Fernando Jerez 2016
*/
// This is only to force Customizer create many files. Changes doesn´t matter. Just click CREATE THING
part = "one"; // [one:Crystal #1, two:Crystal #2, three:Crystal #3, four:Crystal #4,five:Crystal #5,six:Crystal #6,seven:Crystal #7,eight:Crystal #8,nine:Crystal #9,ten:Crystal #10]
@pavlov99
pavlov99 / ansible-galaxy-find-role-id.sh
Created March 27, 2017 07:11
Find your role's id in ansible-galaxy
$ ansible-galaxy info YourUser.RoleName | grep -E 'id: [0-9]' | awk {'print $2'}
@luggage66
luggage66 / valueInspector.jsx
Last active September 23, 2016 00:55
CFDump-like output for JS objects
import React, { Component } from 'react';
import './valueInspector.less';
import Immutable from 'immutable';
export default class ValueInspector extends Component
{
render() {
let referenceTracker = new CircularReferenceTracker();
let path = Immutable.List();
@cube-drone
cube-drone / automation.md
Last active March 26, 2024 20:24
Automation For The People

Automation for the People

Long ago, the first time I read "The Pragmatic Programmer", I read some advice that really stuck with me.

"Don't Use Manual Procedures".

This in the chapter on Ubiquitous Automation. To summarize, they want you to automate all the things.

The trouble was that I hadn't much of an idea how to actually go

@eevee
eevee / fonts.conf.xml
Last active September 5, 2022 03:42
my fonts.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<dir>~/.fonts</dir>
<alias>
<family>serif</family>
<prefer>
<family>Source Serif Pro</family>
<family>IPAMincho</family>
</prefer>
@ralt
ralt / gist:f4bd9e9133dee42e36a6
Last active April 16, 2018 19:30
The Contributors Army

tl;dr we're lazy, we're coders.

Let's make use of that.

  • We don't like to start off new projects and write all the booooring boilerplate
  • We like to fiddle with code and fix it
  • We like recognition
  • We're quickly bored

Hence, I present to you my idea:

@ukabu
ukabu / gulpfile.js
Created February 20, 2014 14:08
Graphviz dot to png using Gulp
var gulp = require('gulp')
var spawn = require('gulp-spawn')
gulp.task('dot', function() {
return gulp.src('*.dot')
.pipe(spawn({
cmd: 'dot'
, args: ['-Tpng']
, filename: function(base, ext) {
return base+'.png'
@wrunk
wrunk / jinja2_file_less.py
Last active September 19, 2023 15:05
python jinja2 examples
#!/usr/bin/env/python
#
# More of a reference of using jinaj2 without actual template files.
# This is great for a simple output transformation to standard out.
#
# Of course you will need to "sudo pip install jinja2" first!
#
# I like to refer to the following to remember how to use jinja2 :)
# http://jinja.pocoo.org/docs/templates/
#