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/bash | |
SD_DIR=~/dev/tools/stable-diffusion | |
cd $SD_DIR | |
source venv/bin/activate | |
echo -n "Enter a prompt: " | |
read prompt |
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
// Quit app on macOS ONLY if using command + Q or some other force quit option: | |
win = new BrowserWindow({ width: 500, height: 500 }) | |
let forceQuit = false | |
// Triggered before close event, i.e. when pressing command + Q | |
app.on('before-quit', () => { | |
forceQuit = true | |
}) |
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
// Hide window instead of quitting when closing it: | |
win = new BrowserWindow({ width: 500, height: 500 }) | |
win.on('close', e => { | |
e.preventDefault() // Prevents quit | |
win.hide() | |
}) |
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
### Keybase proof | |
I hereby claim: | |
* I am t4t5 on github. | |
* I am t4t5 (https://keybase.io/t4t5) on keybase. | |
* I have a public key ASAPsmlyf5n7MxBYdqXPxnGx8BqDoCAYhOGYtC_7F5z1Ago | |
To claim this, I am signing this object: |
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
Verifying my Blockstack ID is secured with the address 1P7MsomekKr1U3wuqdjQCZY153YKrr2sgB https://explorer.blockstack.org/address/1P7MsomekKr1U3wuqdjQCZY153YKrr2sgB |
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
const deleteFile = async () => { | |
// Wait for the user to press a button... | |
const shouldDelete = await swal("Delete file?", "Are you sure that you want to delete this file?", "warning"); | |
if (shouldDelete) { | |
// Code to actually delete file goes here | |
swal("Poof!", "Your file has been deleted!", "success"); | |
} | |
} |
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
// A React component... | |
const List = () => ( | |
<ul> | |
<li>Item 1</li> | |
<li>Item 2</li> | |
</ul> | |
) | |
// Render it as a DOM node... | |
const wrapper = document.createElement() |
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
<!-- index.html --> | |
<html> | |
<head> | |
<title>Todo app</title> | |
<link rel="stylesheet" href="components/todo-list/dist/app.css" /> | |
</head> | |
<body> |
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
#todo-app { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
margin: 60px auto; | |
max-width: 320px; | |
padding: 38px; | |
font-size: 16px; | |
color: rgba(0, 0, 0, 0.8); | |
box-shadow: | |
/* The top layer shadow */ | |
0px 1px 2px rgba(0, 0, 0, 0.18), |
NewerOlder