Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# kinit helper - 解决单用户并发 kinit 报错问题
# 只有当 expiredTime 剩余时间小于 2 小时才进行 kinit 操作,且只允许一次 kinit
source /etc/profile
# 输入参数 $1=租户 $2=租户密码
proxyUser=$1
passwd=$2
# 是否需要 kinit (默认需要=0)
needKinit=0
@Prussia
Prussia / hive-jdbc-example.R
Created September 3, 2019 12:23 — forked from ianmcook/hive-jdbc-example.R
Query Apache Hive from R using JDBC
# Copyright 2018 Cloudera, Inc.
#
# 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
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@Prussia
Prussia / IntelliJ IDEA For Mac.txt
Last active March 17, 2019 10:39
IntelliJ IDEA For Mac
Mac键盘符号和修饰键说明
⌘ Command
⇧ Shift
⌥ Option
⌃ Control
↩︎ Return/Enter
⌫ Delete
⌦ 向前删除键(Fn+Delete)
↑ 上箭头
↓ 下箭头
sudo du -hsx * | sort -rh | head -10
sudo find -type f -exec du -Sh {} + | sort -rh | head -n 5
keytool -noprompt -importcert -trustcacerts -file /prussia.crt -alias prussia -keystore $JAVA_HOME/jre/lib/security/cacerts -storepass changeit
$ sudo netstat -ltnp | grep ':80'
tcp6 0 0 X.X.X.X:80 :::* LISTEN 121638/java
# In the above command, the flags.
# l – tells netstat to only show listening sockets.
# t – tells it to display tcp connections.
# n – instructs it show numerical addresses.
# p – enables showing of the process ID and the process name.
# grep -w – shows matching of exact string (:80).
# kill [signal or option] PID(s)
@Prussia
Prussia / sync-clock.sh
Created April 27, 2018 05:11
Sync clock with ntpd on Alpine Linux (Docker.app VM)
#!/bin/sh
hwclock -s
https://github.com/mattermost/docs/blob/master/source/deployment/sso-saml-okta.md
@Prussia
Prussia / README.md
Created April 6, 2018 03:25 — forked from sieyip/README.md
Installing Kafka on Mac OS X

Installing Kafka on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@Prussia
Prussia / file0.txt
Created December 14, 2017 13:07 — forked from giwa/file0.txt
Install hive on Mac with Homebrew ref: http://qiita.com/giwa/items/dabf0bb21ae242532423
$ brew update
$ brew install hive