国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
#!/usr/bin/env node | |
require('readline').createInterface({input: process.stdin,output: process.stdout}).on('line', (answer) => console.log("葬爱家族村口王师傅: ", answer.replace(/吗?\?$/g, '!'))) |
1. | |
sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev python3-dev ruby-dev lua5.1 lua5.1-dev libperl-dev git | |
2. | |
sudo apt-get remove vim vim-runtime gvim vim-tiny vim-common vim-gui-common vim-nox | |
3. | |
cd ~ | |
git clone https://github.com/vim/vim.git | |
cd vim |
# Ubuntu
sudo apt-get install gpa seahorse
# MacOS with https://brew.sh/
#!/bin/bash | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Original Source: | |
# https://gist.github.com/ggrandes/c1765904e804db15b8c57d90299d006f | |
# |
/** | |
* call wrapper function is equal to use call/apply to invoke function | |
* see follow usage | |
* | |
* @param {Function} f - need to wrapper function | |
*/ | |
var uncurryThis = function(f) { | |
var call = Function.call; | |
return function() { | |
return call.apply(f, arguments); |
abbr g git | |
abbr ga 'git add' | |
abbr gaa 'git add --all' | |
abbr gb 'git branch' | |
abbr gbda git\ branch\ --merged\ \|\ command\ grep\ -vE\ \"\^\(\\\*\|\\s\*master\\s\*\\\$\)\"\ \|\ command\ xargs\ -n\ 1\ git\ branch\ -d | |
abbr gbnm 'git branch --no-merged' | |
abbr gbr 'git branch --remote' | |
abbr gc 'git commit -v' | |
abbr gc! 'git commit -v --amend' | |
abbr gca 'git commit -v -a' |
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh | |
# Aliases | |
alias g='git' | |
#compdef g=git | |
alias gst='git status' | |
#compdef _git gst=git-status | |
alias gd='git diff' | |
#compdef _git gd=git-diff | |
alias gdc='git diff --cached' |
Unzip and move to /opt
Create symlink
// to run: node node-base64-encode.js file | |
const mime = require('mime'); // npm install mime | |
const path = require('path'); | |
const fs = require('fs'); | |
// path to the file we passed in | |
const filepath = path.resolve(process.argv[2]); | |
// get the mimetype | |
const filemime = mime.getType(filepath); |