The project can be built using Lumo
npm install -g lumo-cljs
lumo build.cljs
# Code extracted from https://github.com/parlance-zz/g-diffuser-bot/tree/g-diffuser-bot-diffuserslib-beta | |
# | |
# `pip install numpy image scikit-image` should cover all dependencies, but they are probably installed if you're using SD. | |
# | |
# The GitHub recommends a denoising strength of 0.6 and config scale of 10. | |
# I've found a bit higher values for the denoising strength to work better, ymmv | |
import os, sys | |
from PIL import Image |
<?php | |
declare(strict_Types=1); | |
namespace Example; | |
(function () : void { | |
$requestFactory = new class implements ServerRequestFactory { | |
public function __invoke() : ServerRequest | |
{ |
The project can be built using Lumo
npm install -g lumo-cljs
lumo build.cljs
const updateState = app => m => app.updateData(app.state.withMutations(m)); | |
const cleanup = app => ::app.dispose; | |
export default function(apiUrl, gtmKey) { | |
const api = apiFactory(apiUrl); | |
const data = fromJS(appState); | |
return async (req, res, next) => { | |
try { | |
const app = new Application(data); | |
const routes = defRoutes(app); |
<?php | |
use Sonata\AdminBundle\Admin\Admin; | |
use Sonata\AdminBundle\Form\FormMapper; | |
use Symfony\Component\Form\FormEvent; | |
use Symfony\Component\Form\FormEvents; | |
class SubjectOutsideFunctionAdmin extends Admin | |
{ | |
protected function configureFormFields(FormMapper $formMapper) |
<?php | |
/** | |
* GitHub webhook handler template. | |
* | |
* @see https://docs.github.com/webhooks/ | |
* @author Miloslav Hůla (https://github.com/milo) | |
*/ | |
$hookSecret = 's.e.c.r.e.t'; # set NULL to disable check |
(ns history | |
"Light wrappers and utils for js/history") | |
(defn back! [] (.back js/history)) | |
(defn forward! [] (.forward js/history)) | |
(defn go! [idx] (.go js/history idx)) | |
(defn replace-state! |
(def history (Html5History.)) | |
(.setUseFragment history false) | |
(.setPathPrefix history "") | |
(.setEnabled history true) | |
(let [navigation (listen history EventType/NAVIGATE)] | |
(go | |
(while true | |
(let [token (.-token (<! navigation))] | |
(secretary/dispatch! token))))) |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
;; Some example error messages resulting from common mistakes | |
;; using Datomic 0.8.4138 | |
(ns errors | |
(:use [datomic.api :as d :only (db q)])) | |
(def uri "datomic:mem://database") | |
(d/create-database uri) |