Skip to content

Instantly share code, notes, and snippets.

View hama's full-sized avatar

fang qiang hama

View GitHub Profile
@voodoohop
voodoohop / chatgpt_image_generation.txt
Last active December 13, 2023 19:45
Allow ChatGPT to generate images using Stable Diffusion
You will now act as a prompt generator.
I will describe an image to you, and you will create a prompt that could be used for image-generation.
Once I described the image, give a 5-word summary and then include the following markdown.
![Image](https://image.pollinations.ai/prompt/{description})
where {description} is:
{sceneDetailed}%20{adjective}%20{charactersDetailed}%20{visualStyle}%20{genre}%20{artistReference}
Make sure the prompts in the URL are encoded. Don't quote the generated markdown or put any code box around it.
@stvnrynlds
stvnrynlds / menus-api.liquid
Last active January 19, 2022 14:46
Shopify LinkList API Workaround
{%- layout none -%}
{%- assign listParams = request.path | replace: page.url, "" | remove: "/" | split: '+' -%}
{% if listParams != empty %}
{
{% for param in listParams -%}
{%- assign getList = linklists[param] -%}
{%- if getList != empty %}
"{{ param }}": [{% for level1 in getList.links %}{
"id": "{{ level1.title | handle }}-{{ forloop.index0 }}",
@leobossmann
leobossmann / ee_funnel.js
Last active September 3, 2020 05:25
Checkout Steps for Enhanced Ecommerce labelling, originally by Rob Edlin, https://ecommerce.shopify.com/c/shopify-discussion/t/checkout-labelling-417229
var step_number = 0;
switch (Shopify.Checkout.step) {
case "contact_information":
step_number = 1;
break;
case "shipping_method":
step_number = 2;
break;
@tiagodealmeida
tiagodealmeida / countries.json
Created February 10, 2017 16:59
List of countries with country code, name, currency code, population, capital and continent name in JSON format
{
"countries": {
"country": [
{
"countryCode": "AD",
"countryName": "Andorra",
"currencyCode": "EUR",
"population": "84000",
"capital": "Andorra la Vella",
"continentName": "Europe"