Skip to content

Instantly share code, notes, and snippets.

View lujiacn's full-sized avatar

JL lujiacn

  • earth
  • earth
View GitHub Profile
@lujiacn
lujiacn / gist:1ac3f7e6cef446319476
Last active November 20, 2015 09:26
git connect-proxy
http://www.zeitoun.net/articles/ssh-through-http-proxy/start
Configure the client
I suppose you are on a Linux system (debian for example). First you have to compile the connect binary which will help your ssh client to use proxies (HTTPS in our case). Then you have to configure your ssh client to tell him to use HTTPS proxy when he tries to connect to your ssh server.
Install the connect software :
On debian system, just install the connect-proxy package :
sudo apt-get install connect-proxy
On other Linux systems, you have to compile it :
@lujiacn
lujiacn / Go Revel nginx.conf
Created October 22, 2015 09:23 — forked from tim-peterson/Go Revel nginx.conf
Revel Framework nginx.conf to make Revel app work outside of localhost, i.e., on my live, personal-website.com
http{
index index.html;
server {
listen 80;
root /gocode/src/personalwebsiteapp;
server_name personal-website.com;
package controllers
import (
"encoding/base64"
"errors"
"github.com/robfig/revel"
"net/http"
"strings"
)
@lujiacn
lujiacn / go client basic auth
Created November 20, 2015 09:25
go client basic auth
## from https://answers.callfire.com/hc/en-us/articles/205407787-Authentication
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
@lujiacn
lujiacn / gist:20282bc504145f40c27f
Created November 27, 2015 09:34
add pub key to authorized_keys
cat ~/.ssh/id_rsa.pub | ssh user@hostname 'cat >> .ssh/authorized_keys'
@lujiacn
lujiacn / gist:b1c9867ab61e06086ebb
Created February 16, 2016 10:02
docker with proxy
sudo http_proxy=http://host:port docker daemon &
sudo docker run -it url
@lujiacn
lujiacn / gist:38be004aa5593c3a0fcc
Created March 19, 2016 13:11
mongodb authentication
link: http://ibruce.info/2015/03/03/mongodb3-auth/
不如
码农,程序猿,未来的昏析狮
ArchivesReadingAbout
Mar 3 2015
mongoDB 3.0 安全权限访问控制
MongoDB3.0权限,啥都不说了,谷歌百度出来的全是错的。先安装好盲沟,简单的没法说。
首先,不使用 –auth 参数,启动 mongoDB:
@lujiacn
lujiacn / new_gist_file_0
Last active September 5, 2016 04:19
install git via ppa
http://keyserver.ubuntu.com
Search package name
save public key to local
sudo apt-key add save_pub_key_file
@lujiacn
lujiacn / .Rprofile
Created May 11, 2016 14:07
Ali cran-r
local({r <- getOption("repos")
r["CRAN"] <- "http://mirrors.aliyun.com/CRAN/"
options(repos=r)}
)
@lujiacn
lujiacn / gist:520e3e8abfd1c1b39c30399222766ee8
Last active August 17, 2024 09:06
vundle work with neovim

after install neovim nvim config file folder ~/.config/nvim

$ git clone https://github.com/VundleVim/Vundle.vim.git ~/.config/nvim/bundle/Vundle.vim

set nocompatible              " be iMproved, required
filetype off                  " required
" set the runtime path to include Vundle and initialize

set rtp+=~/.vim/bundle/Vundle.vim