This file contains hidden or 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
# Adjust the following variables as necessary | |
REMOTE=origin | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
BATCH_SIZE=500 | |
# check if the branch exists on the remote | |
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then | |
# if so, only push the commits that are not on the remote already | |
range=$REMOTE/$BRANCH..HEAD | |
else |
This file contains hidden or 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
brew install caddy mkcert nss dnsmasq | |
mkcert -install | |
# test could be anything | |
mkcert '*.app.test' '*.cdn.test' | |
# rename the certs and move them under /usr/local/etc/caddy/certs | |
cat <<EOF > /usr/local/etc/caddy/Caddyfile | |
*.app.test:443, *.cdn.test:443 { |
This file contains hidden or 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
name: Page Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
Replace: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 |
This file contains hidden or 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
using System; | |
public class Node<T> | |
{ | |
public T Data { set; get; } //数据域,当前结点数据 | |
public Node<T> Next { set; get; } //位置域,下一个结点地址 | |
public Node(T item) | |
{ | |
this.Data = item; |
This file contains hidden or 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
</div> | |
<div> | |
<div> | |
<div align="center"> | |
<a href="https://weibo.com/longsl123" target="_blank" align="center"><img src="https://i.imgur.com/i2zdHzG.png" width="50px" height="50px"></a> | |
<a href="https://twitter.com/yilong0722" target="_blank" align="center"><img src="https://i.imgur.com/AhFHxG6.png" width="50px" height="50px"></a> | |
<a href="https://plus.google.com/u/0/106698639613319707124" target="_blank" align="center"><img src="https://i.imgur.com/QW4nDBE.png" width="50px" height="50px"></a> | |
<a href="https://github.com/yilong0722" target="_blank" align="center"><img src="https://i.imgur.com/Uzb3vvG.png" width="50px" height="50px"></a> | |
</div> |
This file contains hidden or 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
# Run application locally on 8 cores | |
./bin/spark-submit \ | |
--class org.apache.spark.examples.SparkPi \ | |
--master local[8] \ | |
/path/to/examples.jar \ | |
100 | |
# Run on a Spark standalone cluster in client deploy mode | |
./bin/spark-submit \ | |
--class org.apache.spark.examples.SparkPi \ |
This file contains hidden or 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
package spark | |
import org.apache.spark.SparkContext | |
import org.apache.spark.SparkContext._ | |
import org.apache.spark.SparkConf | |
object wordcount extends App{ | |
val logFile = "hdfs://hadoop:9000/README.md" | |
val conf = new SparkConf().setAppName("wordcount").setMaster("local") | |
val sc = new SparkContext(conf) |