Make sure you run ollama serve
(this is OpenAI-compatible http://localhost:11434)
Open cursor model settings and specify:
- Specify
http://localhost:8000/v1
- Hit "Save" (no need to activate key)
- Select
gpt-4o
and enjoy local model
uv venv
Make sure you run ollama serve
(this is OpenAI-compatible http://localhost:11434)
Open cursor model settings and specify:
http://localhost:8000/v1
gpt-4o
and enjoy local modeluv venv
plugin's settings:
public class LabelLayoutModifier( | |
val context: Context, | |
val lineHeight: TextUnit, | |
val style: MyTextStyle, | |
) : LayoutModifier { | |
override fun MeasureScope.measure( | |
measurable: Measurable, | |
constraints: Constraints | |
): MeasureResult { |
9 March, 2019
We were discussing with @erusev what we can do with async operation when using useReducer()
in our application. Our app is simple and we don't want to use a state management library. All our requirements are satisfied with using one root useReducer()
. The problem we are facing and don't know how to solve is async operations.
In a discussion with Dan Abramov he recommends Solution 3 but points out that things are fresh with hooks and there could be better ways of handling the problem.
I have tried this setup and although it works and may be good for ceratin circumstances I would advise using ubuntu as the base with docker, docker-compose, and portainer. https://gist.github.com/mow4cash/626275e095f7f90898944a85d66b3be6
Link to my docker run file https://gist.github.com/mow4cash/6a25343cdeb0cd115f263dea0a3b623d
Please read this gist by DasWolke it goes into a much better explanation of why you should use microservice Discord bots.
This is about my experience in making a microservice discord bot.
To start let's look at the core design I was looking for in creating my bot
(https://i.imgur.com/bWxXyc3.png)
I was looking to have multiple gateways that serve different shards groups this design could allow for a beta or premium version of the bot to be hosted on the same service more easily. I also wanted plug and play workers that don't store any information and could be restarted or crash without having any downtime and be scaled just by changing the replica value in docker swarm.
const JSZip = require('jszip') | |
const { parseBuffer } = require('bplist-parser') | |
const { isObject, each, find } = require('lodash') | |
const parseArchivedValue = value => { | |
return parseBuffer(new Buffer(value, 'base64')) | |
} | |
const parseArchivedString = obj => { | |
const { $objects } = parseArchivedValue( |
This is a demonstration of a bi-directional hierarchical sankey diagram produced in javascript, html and css using d3. (Refresh page to generate new random data)
Sankey diagrams represent flows between nodes by varying the thickness of the connecting links.
This diagram was based off of Mike Bostock's sankey diagram, but additionally incorporates bi-directionality into the flow and caters for hierarchical relationships between nodes to allow drill down into the data.
All javascript code to generate the diagram markup is contained in the app.js
file, but the underlying calculations are performed using a custom plugin: bihisankey.js.
This version addresses the issue with double clicking. Demo: http://bl.ocks.org/emoruzzi/6f8140c4d903e64ae35dce0c971e488f
const webpack = require('webpack') | |
const { environment } = require('@rails/webpacker') | |
// Don't use commons chunk for server_side_render chunk | |
const entries = environment.toWebpackConfig().entry | |
const commonsChunkEligible = Object.keys(entries).filter(name => name !== 'server_side_render') | |
environment.plugins.set('CommonsChunkVendor', new webpack.optimize.CommonsChunkPlugin({ | |
name: 'vendor', | |
minChunks: (module, count) => { |
How to flash your ESP8266 without a USB-Serial adapter but with an Arduino.
First be sure everything is connected correcly:
Arduino | ESP82666 |
---|---|
TX | RX |
RX | TX |
GND | GND |
GND | GPIO-15 |