Skip to content

Instantly share code, notes, and snippets.

View thootau99's full-sized avatar
💭
Tng--leh kiàn-kok.

塗豆 thootau99

💭
Tng--leh kiàn-kok.
View GitHub Profile
@linyows
linyows / git_tag
Created March 22, 2012 06:36
増えすぎたgitのtagを削除するスクリプト
#!/bin/zsh
case "$1" in
test)
TYPE=$1
;;
clean)
TYPE=$1
;;
*)
@fokayx
fokayx / git_remote_set-url.md
Last active July 18, 2024 03:36
Git switch remote URLs. Git 更換遠端伺服器倉庫網址

Git 更換遠端伺服器倉庫網址URL

1.確認目前Git遠端伺服器網址: git remote -v

git remote -v
origin  https://github.com/USERNAME/REPOSITORY.git (fetch)
origin  https://github.com/USERNAME/REPOSITORY.git (push)

2.更換Git遠端伺服器位網址,使用:git remote set-url

@261shimizu
261shimizu / Docker.md
Last active March 2, 2023 01:34
仮想化周りの話

コンテナ仮想化

仮想化の種類


OSの仮想化は、大きく分けてホストOS型とハイパーバイザ型に分けられる
ThinkITのこの画像がわかりやすい

  • ホストOS型
    ホストOSの上に仮想化アプリケーション(VirtualBox、VMware workstation、KVM...)などを乗っけて、その上にOSを乗っける形
@nickoala
nickoala / orbslam2_ubuntu_mate.md
Created December 12, 2016 12:20
Build ORB-SLAM2 on Raspberry Pi 3

Build ORB-SLAM2 on Raspberry Pi 3

Operating system: Ubuntu Mate 16.04

I use Ubuntu Mate instead of the usual Raspbian Jessie mainly because of the gcc version. ORB-SLAM2 requires C++11 support. Raspbian comes with gcc 4.9, which does not handle C++11 by default. That means you have to play around with some compiler flags in ORB-SLAM2's CMakeLists.txt to make it work. In contrast, Ubuntu Mate's gcc 5.4 handles C++11 naturally.

@cpsubrian
cpsubrian / db.js
Last active June 13, 2023 06:59
Mock knex database for Jest
/* eslint-env jest */
import _ from 'lodash'
import path from 'path'
import fs from 'fs'
import callsites from 'callsites'
import knex from 'knex'
import hash from 'object-hash'
import conf from '<conf>'
// Get the db config.
@leanderjanssen
leanderjanssen / registry-minio.md
Last active September 4, 2024 04:13
Docker Registry with Minio storage example

Running a docker registry with Minio S3 backend

Run minio in a container

docker run -d -p 9000:9000 --name minio minio/minio server /export

Use docker logs to retrieve access key and secret key from minio container

docker logs minio

Create config.yml for Docker Registry

This file will have to be mounted to /etc/docker/registry/config.yml

@ansemjo
ansemjo / gitlab-backup-to-minio.md
Last active October 18, 2024 13:41
upload gitlab omnibus backups to minio

setup Minio somewhere

Minio is an object storage server compatible with the S3 protocol. Head to https://minio.io/ to learn more.

Hint: You might want to use MINIO_WORM=on to pretect against accidental or malicious deletion of your backups.

seperate users with iam policies

Since RELEASE.2018-10-18T00-28-58Z minio supports seperate users with attached IAM policies. Instead of (or additionally to) using MINIO_WORM=on you could create a new user and attach a writeonly policy:

@andy0130tw
andy0130tw / Pop!_OS.md
Last active December 23, 2023 19:15
Pop!_OS 風味指引

Why I am writing this

Just have got annoyed since Ubuntu decides to drop Unity. I can't get a "clean" GNOME desktop since then. Pop!_OS is an excellent alternative, but as its developers have different guidelines, there are some caveats one needs to get noticed of.

Some tips on Pop!_OS

Look and feel

  1. The shortcut to call out a terminal is Super+T instead of most DE's Ctrl+Alt+T. Also, you may want to enable the top-left corner in dconf.
@andy0130tw
andy0130tw / remove-fbclid.js
Last active January 21, 2021 11:03
A bookmarklet to remove the EVIL fbclid when you want to copy/paste the URL to others
javascript:(H=>{H.replaceState(H.state,null,location.href.replace(/fbclid=[\w\d\-_]+&?/,'').replace(/(\?|&|\?&)$/,''))})(history)