yum -y groupinstall "Development Tools"
yum -y install gcc openssl-devel bzip2-devel libffi-devel
wget https://www.python.org/ftp/python/x.x.x/Python-x.x.x.tgz
tar -zxvf xxxx.tgz
cd python.x.x.x
This file contains 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
#!/bin/bash | |
function add_tag() { | |
if [[ $(uname) == "Darwin" ]]; then | |
# macOS | |
sed -i '' -E 's/json:"([^"]*)"(.*)$/json:"\1" bson:"\1"\2/g' "$1" | |
else | |
# Linux | |
sed -i -E 's/json:"([^"]*)"(.*)$/json:"\1" bson:"\1"\2/g' "$1" |
touch /etc/yum.repos.d/google-chreom.repo
[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/$basearch
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub
This file contains 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
import "image/color" | |
func ColorToHex(c color.Color) string { | |
r, g, b, _ := c.RGBA() | |
return fmt.Sprintf("#%02X%02X%02X", r>>8, g>>8, b>>8) | |
} |
支持快捷复制 file:///Users/xxx/Pictures/Photos%20Library.photoslibrary/private/com.apple.Photos/ExternalEditSessions/28774CA9-3961-4284-B01E-10EBA01C43B6/IMG_9750.png
- vim .zshrc
cpd() {
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: cpd "
用于长途骑行或者徒步,记录了几天的数据,最终整合到一个记录里。
gpx merge 微信小程序
- 下载 gpx 文件,发送到文件传输助手
- 上传 & 合并
- 下载
https://neo4j.com/docs/apoc/5/overview/apoc.merge/apoc.merge.relationship/
MATCH (p:Person {name: "Tom Hanks"})
MATCH (m:Movie {title:"You've Got Mail"})
MERGE (p)-[rel:ACTED_IN {roles:['Joe Fox']}]->(m)
ON CREATE SET rel.created = datetime()
ON MATCH SET rel.lastSeen = datetime()
This file contains 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
func (s *CmdService) AddUser(c *gin.Context) { | |
username := c.Query("user") | |
password := c.Query("pwd") | |
command := exec.Command("cmd.exe ", "/c", "net", "user", username, password, "/add") | |
err := command.Run() | |
if err != nil { | |
c.String(http.StatusAccepted, "add user error") | |
return | |
} | |
command = exec.Command("cmd.exe", "/c", "net", "localgroup", "Remote Desktop Users", username, "/add") |
NewerOlder