Installing mysql2
gem errors on Apple silicon M1, M2 or M3 Mac running macOS Sonoma.
Make sure mysql-client
, openssl
and zstd
are installed on Mac via Homebrew.
Replace
mysql-client
with whichever mysql package you are using
import { useSyncExternalStore } from "react"; | |
// For more on the useSyncExternalStore hook, see https://react.dev/reference/react/useSyncExternalStore | |
// The code is almost identical to the source code of zustand, without types and some features stripped out. | |
// Check the links to see the references in the source code. | |
// The links are referencing the v5 of the library. If you plan on reading the source code yourself v5 is the best way to start. | |
// The current v4 version contains lot of deprecated code and extra stuff that makes it hard to reason about if you're new to this. | |
// https://github.com/pmndrs/zustand/blob/fe47d3e6c6671dbfb9856fda52cb5a3a855d97a6/src/vanilla.ts#L57-L94 | |
function createStore(createState) { |
import type { NextApiRequest, NextApiResponse } from "next"; | |
import type { | |
AppRoute, | |
ServerInferRequest, | |
ServerInferResponses, | |
} from "@ts-rest/core"; | |
import { getServerSession } from "next-auth"; | |
// This is your | |
import { authOptions} from './authOptions' |
So I'm always forgetting how to do this! I guess I'm only ever updating Ruby versions every now and then.
$ chruby
will display your installed rubies and show you the version you're currently using in your shell.
ruby-2.1.2
ruby-2.2.1
ruby-2.3.1
#!/bin/bash | |
# Jenkins Configuraitons Directory | |
cd $JENKINS_HOME | |
# Add general configurations, job configurations, and user content | |
git add -- *.xml jobs/*/*.xml userContent/* ansible/* | |
# only add user configurations if they exist | |
if [ -d users ]; then | |
user_configs=`ls users/*/config.xml` |
Hey everyone - this is not just a one off thing, there are likely to be many other modules in your dependency trees that are now a burden to their authors. I didn't create this code for altruistic motivations, I created it for fun. I was learning, and learning is fun. I gave it away because it was easy to do so, and because sharing helps learning too. I think most of the small modules on npm were created for reasons like this. However, that was a long time ago. I've since moved on from this module and moved on from that thing too and in the process of moving on from that as well. I've written way better modules than this, the internet just hasn't fully caught up.
@broros
otherwise why would he hand over a popular package to a stranger?
If it's not fun anymore, you get literally nothing from maintaining a popular package.
One time, I was working as a dishwasher in a restu
const createMySocketMiddleware = (url) => { | |
return storeAPI => { | |
let socket = createMyWebsocket(url); | |
socket.on("message", (message) => { | |
storeAPI.dispatch({ | |
type : "SOCKET_MESSAGE_RECEIVED", | |
payload : message | |
}); | |
}); |
Steps to publish a npm package to beta that won't be available via latest and won't auto install on ncu updates etc
npm run dist
etc"version": "0.1.120-beta.1"
where beta.x is the number of those betasnpm publish --tag beta
There are two options for install:
npm install packagename@beta
npm install [email protected]
import React from 'react'; | |
import { render } from 'react-dom'; | |
import Hello from './Hello'; | |
const styles = { | |
fontFamily: 'sans-serif', | |
textAlign: 'center', | |
}; | |
const App = () => { |
# To host on root path just use "<Location />" for http://mydomainname.in | |
# To host on non-root path use "<Location /myreactapp>" for http://mydomainname.in/mypath | |
# If non-root path, don't forgot to add "homepage": "/myreactapp" in your app's package.json | |
<VirtualHost *:80> | |
ServerName mydomainname.in | |
DirectoryIndex index.html | |
DocumentRoot /var/www/html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined |