Skip to content

Instantly share code, notes, and snippets.

@lsgrep
lsgrep / kubectl.fish
Created October 10, 2017 09:31 — forked from terlar/kubectl.fish
Kubernetes fish completions
# kubernetes - is an open source system for managing containerized
# applications across multiple hosts, providing basic mechanisms for
# deployment, maintenance, and scaling of applications.
# See: https://kubernetes.io
function __kubectl_no_command
set -l cmd (commandline -poc)
if not set -q cmd[2]
return 0
end
@lsgrep
lsgrep / import_zone.py
Created August 15, 2017 03:12 — forked from onlytiancai/import_zone.py
从zonefile文件把域名记录导入到DNSPod
# -*- coding: utf-8 -*-
'''
功能:
从zonefile文件导入域名到Dnspod
requirements:
dnspython==1.10.0
requests==1.0.4
'''
0xFc571a5fA85fd82393FbD3Ff9d74583a000C174c
git config --global credential.helper store
echo "https://${GITHUB_TOKEN}:x-oauth-basic@github.com" >> ~/.git-credentials
@lsgrep
lsgrep / go-ci-build.sh
Created July 18, 2017 07:56 — forked from wavded/go-ci-build.sh
Go Jenkins CI Script - golang
#!/bin/bash
# Go build script that runs cloc, cpd, lint, vet, test and coverage for Jenkins
#
# Outside tools include:
# gocov: go get github.com/axw/gocov
# gocov-xml: go get github.com/t-yuki/gocov-xml
# go2xunit: go get bitbucket.org/tebeka/go2xunit
# jscpd: npm i jscpd -g
# cloc: npm i cloc -g
@lsgrep
lsgrep / discover-pci-slot-type-linux
Created July 16, 2017 05:12 — forked from antonioams/discover-pci-slot-type-linux
How to discover PCI Slot Type in a Linux Server
[root@local ~]# dmidecode | grep -A 5 "System Slot"
System Slot Information
Designation: PCI1
Type: x4 PCI Express Gen 2 x8
Current Usage: Available
Length: Long
Characteristics:
--
System Slot Information
Designation: PCI2
@lsgrep
lsgrep / gist:2f60125284b26caa64ff
Created December 7, 2015 12:30
push to all repos
git remote | xargs -L1 git push --all
# basics
sudo apt-get update && sudo apt-get install vim-nox fish git zip unzip openjdk-8-jdk -y
#oh my fish
curl -L github.com/oh-my-fish/oh-my-fish/raw/master/bin/install | sh
omf theme
#docker
curl -sSL https://get.docker.com/ | sh
(defun clojure-test-filename ()
(concat (projectile-project-root)
"test/"
(mapconcat #'identity
(butlast (split-string (cider-current-ns) "\\.")) "/")
"/"
(file-name-nondirectory (file-name-sans-extension (buffer-file-name)))
"_test.clj"))
gsutil -o GSUtil:parallel_composite_upload_threshold=150M cp bigfile gs://your-bucket