Skip to content

Instantly share code, notes, and snippets.

View ApOgEE's full-sized avatar
💭
code n learn

M. Fauzilkamil Zainuddin ApOgEE

💭
code n learn
View GitHub Profile
@ApOgEE
ApOgEE / chatgpt-stable-diffusion-generate-prompt
Created June 28, 2023 03:07 — forked from anonymousmaharaj/chatgpt-stable-diffusion-generate-prompt
Prompt for ChatGPT to generate correct prompts to SD. You can leave comment to improve it.
I want you to help me make requests (prompts) for the Stable Diffusion neural network.
Stable diffusion is a text-based image generation model that can create diverse and high-quality images based on your requests. In order to get the best results from Stable diffusion, you need to follow some guidelines when composing prompts.
Here are some tips for writing prompts for Stable diffusion1:
1) Be as specific as possible in your requests. Stable diffusion handles concrete prompts better than abstract or ambiguous ones. For example, instead of “portrait of a woman” it is better to write “portrait of a woman with brown eyes and red hair in Renaissance style”.
2) Specify specific art styles or materials. If you want to get an image in a certain style or with a certain texture, then specify this in your request. For example, instead of “landscape” it is better to write “watercolor landscape with mountains and lake".
3) Specify specific artists for reference. If you want to get an image similar to the work of some
@ApOgEE
ApOgEE / gist:5e1725f1bac4dc00c723681a2d8034ca
Created September 11, 2022 19:33 — forked from nadeemsyed/gist:c89d67fe5805788b7243
Create a sample shared library in golang 1.5.
nadeem@myznc:~/go/src$ ls -al dummy
total 12
drwxrwxr-x 2 nadeem nadeem 4096 Jul 20 18:46 .
drwxrwxr-x 6 nadeem nadeem 4096 Jul 20 18:45 ..
-rw-rw-r-- 1 nadeem nadeem 129 Jul 20 18:46 hello.go
nadeem@myznc:~/go/src/dummy$ cat hello.go
// Package dummy contains hello world library.
package dummy
select (mytext ~ '^([0-9]+[.]?[0-9]*|[.][0-9]+)$');
@ApOgEE
ApOgEE / nginxproxy.md
Created September 12, 2019 06:44 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@ApOgEE
ApOgEE / parse_xlsx.php
Created March 14, 2018 20:03 — forked from searbe/parse_xlsx.php
Parse simple XLSX in PHP with SimpleXML and ZipArchive
<?php
/**
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!)
* but the usual tools were hitting the memory limit pretty quick. I found that
* manually parsing the XML worked pretty well. Note that this, most likely,
* won't work if cells contain anything more than text or a number (so formulas,
* graphs, etc ..., I don't know what'd happen).
*/
@ApOgEE
ApOgEE / controller.php
Created October 29, 2012 19:15 — forked from og-shawn-crigger/controller.php
Valums AJAX File Uploader for CodeIgniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Ajax_uploader extends CI_Controller {
// ------------------------------------------------------------------------
/**
* Array of allowed file extensions to upload.
*
* @var array