Skip to content

Instantly share code, notes, and snippets.

View crapthings's full-sized avatar
😎
🇰🇵我们晚上去

crapthings crapthings

😎
🇰🇵我们晚上去
View GitHub Profile
@phortuin
phortuin / postgres.md
Last active April 10, 2024 10:38
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)

@sindresorhus
sindresorhus / esm-package.md
Last active April 26, 2024 03:53
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@anatoly-scherbakov
anatoly-scherbakov / data.gql
Created March 30, 2020 20:02
Star Wars expressed in grakn.ai
insert
$jedi isa order, has name "Jedi";
$sith isa order, has name "Sith";
# Okay, let's start with some Jedi masters we know of.
$obi-wan isa human, has name "Obi-Wan Kenobi", has gender "male";
$obi-wan-is-jedi (member: $obi-wan, member-of: $jedi) isa membership;
# What do we know about Anakin?
@harveyconnor
harveyconnor / a-mongodb-replica-set-docker-compose-readme.md
Last active April 20, 2024 15:54
MongoDB Replica Set / docker-compose / mongoose transaction with persistent volume

This will guide you through setting up a replica set in a docker environment using.

  • Docker Compose
  • MongoDB Replica Sets
  • Mongoose
  • Mongoose Transactions

Thanks to https://gist.github.com/asoorm for helping with their docker-compose file!

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 26, 2024 07:00
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@Lepozepo
Lepozepo / Dockerfile
Created January 3, 2019 18:55
Not so automatic meteor now deployment
FROM node:8.9.4
LABEL name="hermes"
COPY . /usr/src/app/
WORKDIR /usr/src/app
RUN cat *sf-part* > bundle.tar.gz
RUN tar -xzf bundle.tar.gz
WORKDIR bundle/programs/server
RUN npm install
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 27, 2024 06:09
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@xujiaao
xujiaao / android-install-failed-dexopt-5.1.md
Last active June 8, 2020 12:45
[INSTALL_FAILED_DEXOPT] Error on Android 5.1
tags
Android

[INSTALL_FAILED_DEXOPT] Error on Android 5.1

@giordanocardillo
giordanocardillo / kadira-stack.yml
Created April 29, 2018 18:17
Kadira Docker Stack
version: '3'
services:
kadira-engine:
restart_policy:
condition: on-failure
depends_on:
- mongo
image: vladgolubev/kadira-engine
ports: