Skip to content

Instantly share code, notes, and snippets.

View gclove's full-sized avatar
😄
On smile

gclove gclove

😄
On smile
View GitHub Profile
@gclove
gclove / docker-for-mac.md
Created January 14, 2020 02:53 — forked from BretFisher/docker-for-mac.md
Getting a Shell in the Docker for Mac Moby VM

2018 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Moby VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


<?php
namespace App\Traits;
use Illuminate\Support\Str;
trait UsesUuid
{
/**
* Get the route key for the model.
原帖地址: http://topic.csdn.net/u/20110113/19/b0d5d506-4307-428b-a61d-7974aa66a2da.html
首先要说明的是:这里介绍的方法都是大部分是本人“悟”出来的,所以网上难有流传!
好方法不能自己私藏,否则就白忙乎这几天了,分享给有需要的朋友们。如果有转载,敬请注明来自*CSDN老邓*作品。
呵呵,给自己打广告,实在是无耻之极,权当无聊之时打字之用。
欢迎流传,为最优秀的分布式版本管理系统Git做宣传!!
步骤:
1. 下载:http://loaden.googlecode.com/files/gitconfig.7z
2. 解压到:<MsysGit安装目录>/cmd/,例如:D:\Program Files\Git\cmd
@gclove
gclove / tcp_echo_server_callback.py
Created September 26, 2018 04:41 — forked from PegasusWang/tcp_echo_server_callback.py
使用回调方式实现异步 TCPEchoServer
# https://zhuanlan.zhihu.com/p/42044997 Python 异步 web 框架是如何工作的[视频]
import selectors
import socket
class EventLoop:
def __init__(self, selector=None):
if selector is None:
selector = selectors.DefaultSelector()
self.selector = selector
@gclove
gclove / docker.md
Created May 24, 2018 18:08 — forked from f3l1x/aliases
Docker - installation, tips, commands, aliases

Docker

Shortcuts

$ curl -fsSL https://raw.github.com/tcnksm/docker-alias/master/zshrc >> ~/.bashrc && source ~/.bashrc
# ------------------------------------
@gclove
gclove / git-specify-ssh-key
Created July 24, 2017 08:13 — forked from gskielian/git-specify-ssh-key
Specifying SSH Key within Git Clone
#how to specify an ssh key to use when cloning a repo in Mac
ssh-agent bash -c 'ssh-add /Users/UR_USERNAME/.ssh/UR_PRIVATE_KEY; git clone git@DAS_GIT_URL'