Skip to content

Instantly share code, notes, and snippets.

@maskshell
maskshell / GitConfigHttpProxy.md
Created February 1, 2024 02:36 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@maskshell
maskshell / script.sh
Created July 20, 2022 03:25 — forked from cheungnj/script.sh
Convert asciidoc to Github Flavored Markdown
# Adapted from https://tinyapps.org/blog/nix/201701240700_convert_asciidoc_to_markdown.html
# Using asciidoctor 1.5.6.1 and pandoc 2.0.0.1
# Install pandoc and asciidoctor
$ sudo apt install asciidoctor
$ sudo wget https://github.com/jgm/pandoc/releases/download/2.0.0.1/pandoc-2.0.0.1-1-amd64.deb
$ sudo dpkg -i pandoc-2.0.0.1-1-amd64.deb
# Convert asciidoc to docbook using asciidoctor
@maskshell
maskshell / remove_residual_config.sh
Created June 29, 2020 08:24 — forked from zhaostu/remove_residual_config.sh
One-liner to remov all residual config packages in Ubuntu
# Remove all the packages with residual configuration.
# http://stuzhao.blogspot.com/2012/07/removing-all-residual-config-packages.html
sudo apt-get remove --purge `dpkg -l | grep '^rc' | awk '{print $2}'`
@maskshell
maskshell / squid_https.md
Last active June 18, 2019 03:51 — forked from xjdrew/squid_https.md
配置squid https代理

Squid via HTTPS 配置

编译

通过Ubuntu包管理器安装的Squid并未启用SSL,需要修改参数重新编译。

编译Squid步骤如下。

安装依赖及获取源代码

@maskshell
maskshell / docker-bash-completion.md
Last active October 30, 2018 06:59 — forked from rkuzsma/docker-bash-completion.md
How to configure Bash Completion on Mac for Docker and Docker-Compose

How to configure Bash Completion on Mac for Docker, Docker-Machine and Docker-Compose

Run:

brew install bash-completion

Add the following lines to your ~/.bash_profile:

  if [ -f $(brew --prefix)/etc/bash_completion ]; then
@maskshell
maskshell / BrowserPrint-1.0.4.js
Created August 4, 2018 07:29 — forked from robinsk/BrowserPrint-1.0.4.js
Zebra Browser Print SDK
var BrowserPrint = function() {
function e(e) {
return s + e
}
function n(e, n) {
var i = new XMLHttpRequest;
return "withCredentials" in i ? i.open(e, n, !0) : "undefined" != typeof XDomainRequest ? (i = new XDomainRequest, i.open(e, n)) : i = null, i
}
@maskshell
maskshell / afp-krb5.conf
Created February 24, 2018 05:48 — forked from szaydel/afp-krb5.conf
AFP Configuration File Examples
; Copyright 2009-2015 RackTop Systems Inc. and/or its affiliates.
; http://www.racktopsystems.com
;
; The methods and techniques utilized herein are considered TRADE SECRETS
; and/or CONFIDENTIAL unless otherwise noted. REPRODUCTION or DISTRIBUTION
; is FORBIDDEN, in whole and/or in part, except by express written permission
; of RackTop Systems.
;
; @@DESCRIPTION@@ Configuration file for Netatalk -- Apple Filing Protocol.
; @@NAME@@ afp.conf
@maskshell
maskshell / HAProxy behind AWS ELB: how to force HTTPS?.md
Created November 1, 2017 03:47
HAProxy behind AWS ELB: how to force HTTPS?

HAProxy behind AWS ELB: how to force HTTPS?

What are you trying to solve

You have some nodes in AWS that you want to load balance.

You want to use the magical scaling properties of ELB.

You want to do some things that ELB doesn't do, like force HTTPS (or add headers, or something else).

@maskshell
maskshell / winsvc.go
Created August 29, 2017 06:07 — forked from chai2010/winsvc.go
Windows系统服务例子
// Copyright 2015 <chaishushan{AT}gmail.com>. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build ingore
package main
import (
"flag"
@maskshell
maskshell / gist:3cb6666d525bed4b3ce05f78e5d06aba
Created May 14, 2016 06:53 — forked from m4ce/gist:35298c7091e6150ebeccdb82e1b9a825
JunOS Dynamic VPN setup with LDAP authentication
[edit security]
ike {
policy ike-dyn-vpn-policy {
mode aggressive;
proposal-set standard;
pre-shared-key ascii-text "<key>"; ## SECRET-DATA
}
gateway dyn-vpn-local-gw {
ike-policy ike-dyn-vpn-policy;
dynamic {