This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# encoding: utf-8 | |
# traefik provider 配置: | |
# providers: | |
# http: | |
# endpoint: "http://<host>:<port>/api/config" | |
# pollInterval: "10s" | |
# pollTimeout: "5s" | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.npmjs.com/package/xlsx#installation | |
const xlsx = require('xlsx') | |
const fs = require('fs') | |
const Path = require('path') | |
const printHelp = () => { | |
console.log('Usage: convert.js <input.xls> [<output>]') | |
} | |
const parseOutput = (input, output) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import subprocess | |
import json | |
import logging | |
import os | |
import sys | |
logger = logging.getLogger('docker') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# encoding: utf-8 | |
import urlparse | |
import argparse | |
import base64 | |
import json | |
import time | |
import os | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#-*- coding:utf-8 -*- | |
require 'json' | |
require 'fileutils' | |
def dump_config config, dest | |
driver = config['Driver'] | |
ssh_dir = "#{dest}/.sshkey" | |
if !File.exists?(ssh_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#-*- coding:utf-8 -*- | |
# ssh connection manage | |
require 'json' | |
require 'optparse' | |
def main action, options | |
cfg = "#{ENV['HOME']}/.ssh/.config.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#-*- coding:utf-8 -*- | |
# gem install rugged | |
require "rugged" | |
repo = Rugged::Repository.discover Dir.pwd | |
file_list = [] | |
ext_list = [".png", ".jpg"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 数据库 | |
echo "install database......" | |
sudo apt-get install mysql-workbench mysql-common mysql-client mysql-server mongodb redis-server sqliteman | |
# 输入法 | |
echo "install inputmethod...." | |
sudo apt-get install fcitx-mozc fcitx-table-wbpy fcitx-table-wubi fcitx-ui-classic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"============================================================================= | |
" | |
" FileName: demo.vim | |
" | |
" Author: LongChangjin | |
" Email: admin@longchangjin.cn | |
" | |
"============================================================================= | |
if !has('ruby') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $@ != "" ]]; then | |
if [[ $2 != "" ]]; then | |
curl http://www.gitignore.io/api/$1 -o $2 | |
else | |
curl http://www.gitignore.io/api/$1 | |
fi | |
else | |
echo 创建gitignore文件 |
NewerOlder