###石墨整体架构一览 ####前端篇
#####框架 石墨的前端使用的框架很传统:jQuery + RequireJS,我们使用RequireJS的text模块引入模板,手动用代码渲染数据,没有使用AngularJS之类的MV*框架的原因是自己编写的js更灵活,拓展性更好。框架们的功能都很强大,但是当遇到一些复杂依赖或者性能问题时,坑往往会很深。
#####环境结构
在生产环境下
| // Copyright (c) 2017 Ismael Celis | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy | |
| // of this software and associated documentation files (the "Software"), to deal | |
| // in the Software without restriction, including without limitation the rights | |
| // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| // copies of the Software, and to permit persons to whom the Software is | |
| // furnished to do so, subject to the following conditions: | |
| // The above copyright notice and this permission notice shall be included in all |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
###石墨整体架构一览 ####前端篇
#####框架 石墨的前端使用的框架很传统:jQuery + RequireJS,我们使用RequireJS的text模块引入模板,手动用代码渲染数据,没有使用AngularJS之类的MV*框架的原因是自己编写的js更灵活,拓展性更好。框架们的功能都很强大,但是当遇到一些复杂依赖或者性能问题时,坑往往会很深。
#####环境结构
在生产环境下
| <audio id="alarm" src="alarm.ogg" controls></audio> | |
| <script> | |
| const alarmElement = document.getElementById('alarm'); | |
| const alarmTimes = [ | |
| new Date('2015-11-13 07:00 -0500'), | |
| new Date('2015-11-13 08:00 -0500'), | |
| new Date('2015-11-13 08:30 -0500'), | |
| ]; | |
| function playAlarm() { |
| <html> | |
| <body> | |
| <script> | |
| /** | |
| * This array diff algorithm is useful when one wants to detect small changes | |
| * (like consecutive insertions or consecutive deletions) several times | |
| * in short time intervals. Alternative algorithms like LCS woud be too expensive | |
| * when running it too many times. | |
| */ |
Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.
This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.
There is a companion feature matrix of various tools. Comments are welcome in the same manner.
| func ip2int(ip net.IP) uint32 { | |
| if len(ip) == 16 { | |
| return binary.BigEndian.Uint32(ip[12:16]) | |
| } | |
| return binary.BigEndian.Uint32(ip) | |
| } | |
| func int2ip(nn uint32) net.IP { | |
| ip := make(net.IP, 4) | |
| binary.BigEndian.PutUint32(ip, nn) |
| #!/bin/bash | |
| mkdir -p out | |
| for img in `grep image $1| sed -e 's/^.*image\: //g'`; | |
| do | |
| cleanname=${img/\//-} | |
| tag=`docker images | grep $img | awk '{print $2}'` | |
| echo "Exporting image: $img, tag:$tag ($cleanname)..." | |
| docker save $img -o out/$cleanname.tar |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
Create the app and download the necessary dependencies.