Skip to content

Instantly share code, notes, and snippets.

View beenotung's full-sized avatar

Beeno Tung beenotung

View GitHub Profile
@jaceklaskowski
jaceklaskowski / Rough Notes about CQRS and ES.md
Last active March 31, 2024 03:06
Rough Notes about CQRS and ES

Rough Notes about CQRS and ES

Once upon a time…

I once took notes (almost sentence by sentence with not much editing) about the architectural design concepts - Command and Query Responsibility Segregation (CQRS) and Event Sourcing (ES) - from a presentation of Greg Young and published it as a gist (with the times when a given sentence was heard).

I then found other summaries of the talk and the gist has since been growing up. See the revisions to know the changes and where they came from (aka the sources).

It seems inevitable to throw Domain Driven Design (DDD) in to the mix.

@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@dalezak
dalezak / README.md
Last active September 11, 2023 09:51
Ionic Capacitor Resources Generator
  1. Run npm install cordova-res --save-dev
  2. Create 1024x1024px icon at resources/icon.png
  3. Create 2732x2732px splash at resources/splash.png
  4. Add "resources": "cordova-res ios && cordova-res android && node scripts/resources.js" to scripts in package.json
  5. Copy resources.js file to scripts/resources.js
  6. Run sudo chmod -R 777 scripts/resources.js
  7. Run npm run resources
@lirantal
lirantal / node-sandbox.md
Last active August 28, 2023 11:06
node-sandbox

The following creates a container with a mounted volume so it can be used as a sandbox that doesn't expose your local development environment incase of any rogue npm packages that steal your .npmrc token, environment variables and others

Run the following:

@mariussoutier
mariussoutier / Mail.scala
Created August 23, 2012 12:13
Sending mails fluently in Scala
package object mail {
implicit def stringToSeq(single: String): Seq[String] = Seq(single)
implicit def liftToOption[T](t: T): Option[T] = Some(t)
sealed abstract class MailType
case object Plain extends MailType
case object Rich extends MailType
case object MultiPart extends MailType
@akehrer
akehrer / sqlite_to_json.sql
Created January 9, 2018 19:58
SQLite Results as JSON using the SQLite JSON1 extension
-- When SQLite is compiled with the JSON1 extensions it provides builtin tools
-- for manipulating JSON data stored in the database.
-- This is a gist showing SQLite return query data as a JSON object.
-- https://www.sqlite.org/json1.html
-- An example table with some data
CREATE TABLE users (
id INTEGER PRIMARY KEY NOT NULL,
full_name TEXT NOT NULL,
email TEXT NOT NULL,
@joelharkes
joelharkes / launch.json
Last active September 18, 2022 08:19
Debug ts-mocha in vs code (visual studio code)
{
"version": "0.2.0",
"configurations": [
{
"name": "Run ts-mocha File",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/ts-mocha",
"runtimeArgs": [
"${file}"
p {
font-size:18px;
line-height:24px;
text-align: justify;
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAbCAYAAAC5rTVJAAAA3ElEQVQY0wXBwU3CABQA0Oe3IVgarFpDwYNH41GvLuMYzuQ4boBKiqGBptbCoQHf8+b19C4/vb44RWElmTdWEyJXaUuqMZFaO1zykxCJ2nDBJoghoxnjeCv6lHqEYSaaKdsc+4WoMz5nN/QLsZ7wcXjkrxSrCdvjE10hqjG+zmlz8ZOgSehTsQkcS7pEON6yD4VBGGa0Y6Ve2C/YPptrhH7h+vvgTi38lR7USmuhK9zrZZZCm7uy1VkKfSrVoRa6xJmdQisKA1qjlCj1Er/SjJhrDCrNlLhTK+3UGf/2IVZs3eANJQAAAABJRU5ErkJggg==);
background-size:100% 72px;
-webkit-background-clip:text;
-webkit-text-fill-color:transparent
}