See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| Stable Diffusion is an AI art generation model similar to DALLE-2. | |
| Here are some prompts for generating art with Stable Diffusion. | |
| Example: | |
| - A ghostly apparition drifting through a haunted mansion's grand ballroom, illuminated by flickering candlelight. Eerie, ethereal, moody lighting. | |
| - portait of a homer simpson archer shooting arrow at forest monster, front game card, drark, marvel comics, dark, smooth | |
| - pirate, deep focus, fantasy, matte, sharp focus | |
| - red dead redemption 2, cinematic view, epic sky, detailed, low angle, high detail, warm lighting, volumetric, godrays, vivid, beautiful | |
| - a fantasy style portrait painting of rachel lane / alison brie hybrid in the style of francois boucher oil painting, rpg portrait |
I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).
Use ssh keys and define host aliases in ssh config file (each alias for an account).
| import sys | |
| import xml.etree.cElementTree as et | |
| from io import BytesIO | |
| from django.core.exceptions import ValidationError | |
| from django.core.validators import ( | |
| FileExtensionValidator, | |
| get_available_image_extensions, | |
| ) | |
| from django.forms import ImageField as DjangoImageField |
| if DEBUG: | |
| EMAIL_HOST = 'localhost' | |
| EMAIL_PORT = 1025 | |
| EMAIL_HOST_USER = '' | |
| EMAIL_HOST_PASSWORD = '' | |
| EMAIL_USE_TLS = False | |
| DEFAULT_FROM_EMAIL = 'testing@example.com' |
| FROM nginx:alpine | |
| # stock verison from php:alpine image | |
| # ensure www-data user exists | |
| RUN set -x \ | |
| && addgroup -g 82 -S www-data \ | |
| && adduser -u 82 -D -S -G www-data www-data | |
| # 82 is the standard uid/gid for "www-data" in Alpine | |
| # http://git.alpinelinux.org/cgit/aports/tree/main/apache2/apache2.pre-install?h=v3.3.2 |
| import 'dart:core'; | |
| import 'dart:async'; | |
| import 'dart:io'; | |
| void startServer() { | |
| Future<ServerSocket> serverFuture = ServerSocket.bind('0.0.0.0', 55555); | |
| serverFuture.then((ServerSocket server) { | |
| server.listen((Socket socket) { | |
| socket.listen((List<int> data) { | |
| String result = new String.fromCharCodes(data); |
| #-*- coding: utf-8 -*- | |
| import subprocess | |
| if __name__ == '__main__': | |
| ps = subprocess.Popen(['nodejs','ps2.js'], stdin=subprocess.PIPE, stdout=subprocess.PIPE) | |
| out = ps.communicate(input='http://www.daum.net'.encode())[0] | |
| print(out.decode('utf-8')) |