Skip to content

Instantly share code, notes, and snippets.

@jsleetw
jsleetw / disco_v5_plus_Win_Install.md
Created June 12, 2023 10:55 — forked from MSFTserver/disco_v5_plus_Win_Install.md
guide to installing disco v5+ locally on windows

Install Disco Diffusion v5 for Windows

NOTE: Pytorch3d no longer has to be compiled i have stripped out the function we use to make this a lot easier and also so we do not have to use WSL2 with linux and can now run directly on your windows system.

Comments section is not checked often for issues please join the disco diffusion discord for assistance

https://discord.gg/mK4AneuycS

You may now use the official disco diffusion notebook with this tutorial as it has been uodated to reflect the changes here for better cross platform support

@MSFTserver
MSFTserver / disco_v5_plus_Win_Install.md
Last active June 25, 2023 02:13
guide to installing disco v5+ locally on windows

Install Disco Diffusion v5 for Windows

NOTE: Pytorch3d no longer has to be compiled i have stripped out the function we use to make this a lot easier and also so we do not have to use WSL2 with linux and can now run directly on your windows system.

Comments section is not checked often for issues please join the disco diffusion discord for assistance

https://discord.gg/mK4AneuycS

You may now use the official disco diffusion notebook with this tutorial as it has been uodated to reflect the changes here for better cross platform support

@meyu
meyu / Install Autosub on macOS.md
Last active March 1, 2024 06:40
Install Autosub on macOS

預先安裝(若需要)

安裝 Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

安裝 FFmpeg

brew install ffmpeg
@shengyou
shengyou / initialize.sh
Last active August 24, 2016 07:46
COSCUP 2016 Laravel 部署工作坊裝機指令集
# get startup.sh from gist
wget https://gist.githubusercontent.com/shengyou/644b1ac28fa05e34146369e4bda53176/raw/06028bf9e9870aaed0085261bdbdbcc91a6b0128/startup.sh
# run startup script
bash startup.sh
# generate ssh key
ssh-keygen -t rsa -b 4096 -C "{your email}"
# clone your app
@frzsombor
frzsombor / gist:ddd0e11f93885060ef35
Last active July 4, 2024 12:56
Share Laravel's session and check authentication from external projects
<?php
/*
|--------------------------------------------------------------------------
| Sharing Laravel's session and checking authentication
|--------------------------------------------------------------------------
|
| Use the following code in any CMS (WordPress, Joomla, etc), filemanager (CKFinder,
| KCFinder, simogeos's Filemanager, etc), or any other non-Laravel project to boot into
| the Laravel framework, with session support, and check if the user is authenticated.
@jbradach
jbradach / Init Script for Redmine using Puma
Last active August 29, 2015 14:05
Init script for Redmine and Puma
#! /bin/sh
### BEGIN INIT INFO
# Provides: redmine
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts redmine with puma
# Description: Starts redmine from /home/redmine/redmine.
### END INIT INFO
@jsleetw
jsleetw / gist:9806390
Last active October 3, 2023 08:27
Optimizer image in command line
sudo apt-get install jpegoptim optipng
find . -type f -name "*.jpg" -exec jpegoptim {} \;
find . -type f -name "*.png" -exec optipng {} \;
find . -type f -name "*.jpeg" -exec jpegoptim {} \;
---
sudo apt-get install imagemagick
find . -type f -size +1000k -name "*.jpg" -exec convert {} -resize "2048>x2048>" {} \;
find . -type f -size +1000k -name "*.jpeg" -exec convert {} -resize "2048>x2048>" {} \;
find . -type f -size +1000k -name "*.png" -exec convert {} -resize "2048>x2048>" {} \;
@hwdsl2
hwdsl2 / .MOVED.md
Last active May 19, 2024 06:28
IPsec VPN Server Auto Setup Script for Ubuntu and Debian
@josephj
josephj / happy-desinger-mini-1.md
Last active December 18, 2015 10:39
於 HappyDesigner Mini #1 分享會

JavaScript 品質工具:CodePaint 與 Plato

介紹協助提昇 F2E Code Style 的兩個工具。

分享者

josephj@faria

問題

@jameskoster
jameskoster / functions.php
Last active July 29, 2022 10:01
WooCommerce - display category image on category archive
add_action( 'woocommerce_archive_description', 'woocommerce_category_image', 2 );
function woocommerce_category_image() {
if ( is_product_category() ){
global $wp_query;
$cat = $wp_query->get_queried_object();
$thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true );
$image = wp_get_attachment_url( $thumbnail_id );
if ( $image ) {
echo '<img src="' . $image . '" alt="' . $cat->name . '" />';
}