This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.app.Service | |
import android.content.ComponentName | |
import android.content.Context | |
import android.content.Intent | |
import android.content.ServiceConnection | |
import android.os.IBinder | |
import kotlin.coroutines.resume | |
import kotlin.coroutines.suspendCoroutine | |
suspend inline fun <reified S : Service, B : IBinder> Context.connectService( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Build; | |
import java.lang.reflect.Method; | |
public class Device { | |
/** | |
* @return The device's serial number, visible to the user in {@code Settings > About phone/tablet/device > Status | |
* > Serial number}, or {@code null} if the serial number couldn't be found | |
*/ | |
public static String getSerialNumber() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Define paths where the checkstyle file is and where to check for style inconsistencies | |
CHECKSTYLE_PATH="checkstyle.xml" | |
CHECKSTYLE_FOLDERS_TO_CHECK="app/src/main/java app/src/androidTest/java app/src/test/java" | |
#Check if the 'checkstyle' command is installed | |
#Magic: http://stackoverflow.com/a/677212 | |
command -v checkstyle >/dev/null 2>&1 || { echo >&2 "checkstyle is not installed, aborting.\nInstall it using brew or apt-get"; exit 1; } | |
#Run checkstyle over our files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Quinn Comendant <[email protected]> | |
# https://gist.github.com/quinncomendant/3be731567e529415d5ee | |
# Since 25 Jan 2015 | |
# Version 1.1 | |
CMD=$1; | |
if [[ `id -u` = 0 ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.preference.DialogPreference; | |
import android.preference.Preference; | |
import android.util.AttributeSet; | |
import android.view.View; | |
import android.widget.TimePicker; | |
import java.text.DateFormat; | |
import java.util.Calendar; |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.