Skip to content

Instantly share code, notes, and snippets.

View longshilin's full-sized avatar
🐈
Focusing

longshilin

🐈
Focusing
View GitHub Profile
@longshilin
longshilin / push.sh
Created December 26, 2022 19:06 — forked from Yash089610/push.sh
remote: fatal: pack exceeds maximum allowed size
# 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
@longshilin
longshilin / https-during-dev.macos.sh
Created November 21, 2021 07:13 — forked from StevenACoffman/https-during-dev.macos.sh
Use Caddy, mkcert and dnsmasq to expose your development server over HTTPS
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 {
@longshilin
longshilin / Depoly.yaml
Last active November 9, 2020 04:33
Github Workflow For Docsify Pages Depoly
name: Page Deploy
on:
push:
branches:
- master
jobs:
Replace:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@longshilin
longshilin / LinkList.cs
Created November 4, 2019 04:12
LinkList - Module(链表模板)
@longshilin
longshilin / 2018-08-26 CSDN最新专栏备份
Last active August 26, 2018 14:49
CSDN 个人博客栏目自定义代码 [blog.csdn.net/Coder__CS](http://blog.csdn.net/Coder__CS)
</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>
@longshilin
longshilin / spark-submit
Last active January 21, 2018 14:42
Spark Submit Script
# 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 \
@longshilin
longshilin / wordcount.scala
Last active January 20, 2018 05:02
spark-wordcount | programme in scala | total: 1file
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)