Skip to content

Instantly share code, notes, and snippets.

Avatar
😎
🇰🇵我们晚上去

crapthings crapthings

😎
🇰🇵我们晚上去
View GitHub Profile
@phortuin
phortuin / postgres.md
Last active Aug 9, 2022
Set up postgres + database on MacOS (M1)
View postgres.md

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql

Run server:

View esm-package.md

Pure ESM package

The package linked to from 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 Mar 30, 2020
Star Wars expressed in grakn.ai
View data.gql
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 Jul 29, 2022
MongoDB Replica Set / docker-compose / mongoose transaction with persistent volume
View a-mongodb-replica-set-docker-compose-readme.md

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!

@Lepozepo
Lepozepo / Dockerfile
Created Jan 3, 2019
Not so automatic meteor now deployment
View Dockerfile
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 Aug 6, 2022
The truth about Svelte
View what-is-svelte.md

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 Jun 8, 2020
[INSTALL_FAILED_DEXOPT] Error on Android 5.1
View android-install-failed-dexopt-5.1.md
tags
Android

[INSTALL_FAILED_DEXOPT] Error on Android 5.1

View kadira-stack.yml
version: '3'
services:
kadira-engine:
restart_policy:
condition: on-failure
depends_on:
- mongo
image: vladgolubev/kadira-engine
ports:
@gwpantazes
gwpantazes / How to Install JDK MacOS Homebrew.md
Last active Aug 7, 2022
How to install different JDK versions on MacOS with Homebrew
View How to Install JDK MacOS Homebrew.md

How To Install Different JDK Versions on MacOS with Homebrew

Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version

This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.

Table of Contents

@agrcrobles
agrcrobles / android_instructions_29.md
Last active Jul 9, 2022 — forked from patrickhammond/android_instructions.md
Setup Android SDK on OSX with and without the android studio
View android_instructions_29.md

Hi, I am a fork from https://gist.github.com/patrickhammond/4ddbe49a67e5eb1b9c03.

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites:

https://github.com/shyiko/jabba instead ?