Skip to content

Instantly share code, notes, and snippets.

View dhb52's full-sized avatar

dhb52 dhb52

  • China
View GitHub Profile
@dhb52
dhb52 / docker-compose.yaml
Created May 23, 2023 16:48 — forked from joebeeson/docker-compose.yaml
Anchors in docker-compose.yaml
version: "3.4"
x-defaults: &defaults
image: "dask-dev/dask-notebook"
# With lists, each entry requires its own anchor if you
# intend to extend/reuse an entry in concrete services.
configs:
- &configs_condarc
source: "condarc"
@dhb52
dhb52 / README.md
Created December 6, 2022 05:16 — forked from mrbar42/README.md
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
defaults write com.apple.dock ResetLaunchPad -bool TRUE && killAll Dock
@dhb52
dhb52 / Docker-machine.md
Created September 12, 2019 07:01
docker-machine

问题

docker-machine create --driver virtualbox servm-1
Creating CA: /Users/username/.docker/machine/certs/ca.pem
Creating client certificate: /Users/username/.docker/machine/certs/cert.pem
Running pre-create checks...
(servm-1) Image cache directory does not exist, creating it at /Users/username/.docker/machine/cache...
(servm-1) No default Boot2Docker ISO found locally, downloading the latest release...
Error with pre-create check: "failure getting a version tag from the Github API response (are you getting rate limited by Github?)"
@dhb52
dhb52 / DS_Store.md
Last active November 3, 2019 01:03
.DS_Store

.DS_Store(英文全称 Desktop Services Store)是一种由苹果公司的Mac OS X操作系统所创造的隐藏文件,目的在于存贮目录的自定义属性,例如文件们的图标位置或者是背景色的选择。相当于 Windows 下的 desktop.ini。

删除 .DS_Store

如果你的项目中还没有自动生成的 .DS_Store 文件,那么直接将 .DS_Store 加入到 .gitignore 文件就可以了。如果你的项目中已经存在 .DS_Store 文件,那就需要先从项目中将其删除,再将它加入到 .gitignore。如下:

删除项目中的所有.DS_Store。这会跳过不在项目中的 .DS_Store

1.find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
/**
* url:https://blog.csdn.net/what951006/article/details/73695117
*/
#include <Winsock2.h>
#include "iphlpapi.h"
#include <iostream>
using namespace std;
#pragma comment(lib,"Iphlpapi.lib")
@dhb52
dhb52 / MacOS-ms-office.lang.md
Last active November 24, 2019 16:39
macOS MS-Office languages settings
  1. add config
defaults write com.microsoft.Word AppleLanguages '("zh-Hans-CN")'
defaults write com.microsoft.Excel AppleLanguages '("zh-Hans-CN")'
defaults write com.microsoft.Powerpoint AppleLanguages '("zh-Hans-CN")'
defaults write com.microsoft.errorreporting AppleLanguages '("zh-Hans-CN")'
defaults write com.microsoft.Outlook AppleLanguages '("zh-Hans-CN")'
defaults write com.microsoft.onenote.mac AppleLanguages '("zh-Hans-CN")'
defaults write com.microsoft.Office365ServiceV2 AppleLanguages '("zh-Hans-CN")'
@dhb52
dhb52 / rm_mysql.md
Last active July 3, 2019 22:52 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@dhb52
dhb52 / ustc-brew-origin.md
Last active April 22, 2019 08:29
中科大brew源

中科大brew源

git -C "/usr/local/Homebrew" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

Bottle

对于bash用户:

@dhb52
dhb52 / ustc-brew-origin.md
Created April 20, 2019 13:19
中科大brew源

中科大brew源

git -C "/usr/local/Homebrew" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

恢复官方源

git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew.git