Skip to content

Instantly share code, notes, and snippets.

View setekhid's full-sized avatar

Huize Dai setekhid

  • Beijing, China
View GitHub Profile
2017-10-20 E86FECAA5DC76671 Huitse Tai <geb.1989@gmail.com>
Fingerprint=D266 E71A 71D2 81DD E4BA 0131 E86F ECAA 5DC7 6671
2017-10-21 7E15FEC622651E65 Huitse Tai <geb.1989@gmail.com>
Fingerprint=303B 5CD6 7387 82B2 AA39 0CC3 7E15 FEC6 2265 1E65
@setekhid
setekhid / dcos-network-components-overview.md
Created June 22, 2017 03:38
blog@terminus: dcos-network-components-overview

DC/OS 1.8 网络组件介绍

本 overview 有效期有限,据 slack 上一位兄弟言,1.8的 VIPs 由 dcos-minuteman 实现,1.9为 dcos-navstar ,暂不清楚。

[toc]

DNS

DC/OS 提供三层 DNS 服务,主要用于对集群内部进行服务发现。

@setekhid
setekhid / 30-minutes-stuck-in-python.md
Created June 22, 2017 03:35
blog: 30-minutes-stuck-in-python

30 minutes stuck in python

This article is not intended to explain any details about python or its utilities, only for whom wanna start coding quickly.

While this sentence was being written, I only read some codes from some python projects. And I knew some basic knowledges and experiences about programming, like how to build a project, some other programming languages (java, scala, haskell, c/c++, nodejs etc.).

Now my problem is I wanna contribute to dcos building scripts, so here we are,

[toc]

#!/usr/bin/env python3
import tkinter as tk
#https://docs.python.org/3/library/tkinter.html
my_accounts = {
"user1": {
"example.com": 148888888,
},
version: '2'
services:
etcd1:
image: quay.io/coreos/etcd:v3.1.7
restart: always
ports:
- 23791:2379
- 23801:2380
environment:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@setekhid
setekhid / configuration.nix
Last active May 22, 2017 16:40
lbnuc /etc/nixos
# Edit this configuration file to define what should be installed on
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
@setekhid
setekhid / .bash_profile
Last active October 20, 2017 02:42
~HOME
# goes into vi mode
set -o vi
# user's private bin path
export PATH="$PATH:$HOME/.local/bin"
# for golang
export GOPATH="$HOME/.GOPATH"
export GOBIN="$HOME/.local/bin"
@setekhid
setekhid / .tmux.conf
Last active June 1, 2017 09:48
~HOME
# window index from 1
set -g base-index 1
# vi key binding in copy mode
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
# vim style pane selection
bind h select-pane -L
on idle
tell application "System Events"
tell current location of network preferences
set myConnection to the service "HMA! (PPTP)"
if myConnection is not null then
if current configuration of myConnection is not connected then
connect myConnection
end if
end if
end tell