Skip to content

Instantly share code, notes, and snippets.

View lsdlab's full-sized avatar
🏎️
Racing

JC lsdlab

🏎️
Racing
View GitHub Profile
{"sig":"fc8b0c81bc27079dd4ff1efe9f33e48e634d7d8f6102d81181bcd261ffb9306bf83d4967213ed69876d2b26b223fb6fc1179bf51010ed86c9dc7704d75b01a680","msghash":"f6c2c251f5f52c194e8687d777be7d3f0111e3d8aa52bbb94774d613c3484a95"}
import json
from datetime import datetime, timedelta
from elasticsearch import Elasticsearch
if __name__ == '__main__':
# create ES instance
es = Elasticsearch()
# create index
es.indices.create(index='track_log', ignore=400)
@lsdlab
lsdlab / publishblog.sh
Last active November 23, 2016 14:28
Pelican update site to GitHub shell script
#! /bin/zsh
make html
cd output
git add .
git commit -m "update"
git push origin master
ssh skynet "cd BreakWire; git pull origin master; exit"
@lsdlab
lsdlab / newblog.sh
Last active November 23, 2016 14:27
Pelican new blog shell script
#! /bin/zsh
cd content/
fileName=`date "+%Y-%m-%d"`
currentTime=`date "+%Y-%m-%d %H:%M:%S"`
cat>${fileName}.md<<EOF
Title:
Date: ${currentTime}