Skip to content

Instantly share code, notes, and snippets.

@npearce
npearce / install-docker.md
Last active May 9, 2024 07:23
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
@gaetschwartz
gaetschwartz / settings.json
Last active May 9, 2024 07:21
Nest files in Flutter projects on VSCode, inspired from https://github.com/antfu/vscode-file-nesting-config
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
"pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml",
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
"readme.*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md",
"*.dart": "$(capture).g.dart, $(capture).freezed.dart",
},
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 9, 2024 07:18
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active May 9, 2024 07:13
国内的 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+

@MahfuzulAlam
MahfuzulAlam / class-tools.php
Created March 12, 2024 10:55
Directorist - Google Content Image Import Solution
<?php
public static function atbdp_insert_attachment_from_url( $file_url ) {
if (!filter_var($file_url, FILTER_VALIDATE_URL)) {
return false;
}
$contents = @file_get_contents($file_url);
if ($contents === false) {
@TinDang97
TinDang97 / build_ffmpeg_cuda_debian
Last active May 9, 2024 07:12
Build FFMPEG script with full feature, include scale_cuda, scale_npp, vpx, libx,...
#!/bin/bash
# https://github.com/markus-perl/ffmpeg-build-script
PROGNAME=$(basename $0)
VERSION=1.18
CWD=$(pwd)
PACKAGES="$CWD/packages"
WORKSPACE="$CWD/workspace"
CFLAGS="-I$WORKSPACE/include"
@shukla2112
shukla2112 / pgOpsGuide.md
Last active May 9, 2024 07:12
Postgresql operations

This guide includes queries for postgreql

misc/utility commands

Set pager off

\pset pager off
  1. Check when vaccum was run
@zorn-v
zorn-v / build.sh
Last active May 9, 2024 07:15
xkb switch on release deb build
#!/bin/bash
rm -rf build
mkdir -p build
cd build
sudo apt install devscripts -y
sudo mk-build-deps -t'apt-get -y' -ir xserver-xorg-core
apt source xserver-xorg-core
@aidos-dev
aidos-dev / README.md
Last active May 9, 2024 07:09
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf
@m-jovanovic
m-jovanovic / .editorconfig
Created June 7, 2023 12:17
Sample editor config with a bunch of rules turned off 😅
root = true
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4
indent_style = space