Skip to content

Instantly share code, notes, and snippets.

@CaptainLeon445
CaptainLeon445 / install-docker.md
Created May 9, 2024 09:55 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@bn-l
bn-l / recursive-file-lister-generator.js
Created May 9, 2024 09:54
Very cool snippet showing the use of a JS generator to walk a directory recursively. Yields the path of files found.
/**
* @param {string} rootPath
* @returns {Generator<string>}
*/
function* walk(rootPath) {
for (const entry of fs.readdirSync(rootPath, { withFileTypes: true })) {
const filePath = path.join(rootPath, entry.name);
if (entry.isDirectory()) yield* walk(filePath);
else yield filePath;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vool
vool / ireland.geojson
Created March 22, 2019 00:31
Ireland (Island/32 counties) geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Apatrid
Apatrid / lightbox-modal.html
Created November 24, 2020 09:29
Alpine.js + TailwindCSS Lightbox Modal
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alpine.js-TailwindCSS-Lightbox-Modal</title>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.x.x/dist/alpine.min.js" defer></script>
</head>
<body>
@npearce
npearce / install-docker.md
Last active May 9, 2024 09:55
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@nh2
nh2 / rigid-transform-with-scale.py
Last active May 9, 2024 09:50
Rigidly (+scale) aligns two point clouds with know point-to-point correspondences, in Python with numpy
import numpy as np
import numpy.linalg
# Relevant links:
# - http://stackoverflow.com/a/32244818/263061 (solution with scale)
# - "Least-Squares Rigid Motion Using SVD" (no scale but easy proofs and explains how weights could be added)
# Rigidly (+scale) aligns two point clouds with know point-to-point correspondences
# with least-squares error.
@alex1504
alex1504 / css-chinese-font.md
Last active May 9, 2024 09:48
css中常用font-family

实例

  • 例1(小米米官网):font: 14px/1.5 "Helvetica Neue",Helvetica,Arial,"Microsoft Yahei","Hiragino Sans GB","Heiti SC","WenQuanYi Micro Hei",sans-serif;
  • 例2(淘宝技术研发中心):font: 12px/1.5 tahoma,arial,'Hiragino Sans GB','\5b8b\4f53',sans-serif;
  • 例3(加网 ):font: 14px/1.5 'Microsoft YaHei',arial,tahoma,\5b8b\4f53,sans-serif;
  • 例4(淘宝UED):font: 12px/1 Tahoma,Helvetica,Arial,"\5b8b\4f53",sans-serif;
  • 例5(一淘UX):font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', '微软雅黑', Arial, sans-serif;
  • 例6(简书):font-family: "lucida grande", "lucida sans unicode", lucida, helvetica, "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;

HTML,CSS,font-family:中文字体的英文名称

通用

@ddieppa
ddieppa / InstallChocolateyPackages.ps1
Last active May 9, 2024 09:48
My "must" chocolatey packages
function main {
Update-Windows-Configuration
Install-Utils
Install-Browsers
Install-Fonts
@dhh
dhh / linux-setup.sh
Last active May 9, 2024 09:47
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils