本篇文章告诉你如何在 Mac OS X 上用免费的工具来将屏幕录制视频转成 GIF 动画, 这些免费的工具是: QuickTime, ffmpeg, and gifsicle.
首先, 使用系统自带的 "QuickTime Player" 程序来录制屏幕:
| # Disable crontab -r | |
| function crontab () | |
| { | |
| # Replace -r with -e | |
| /usr/bin/crontab "${@/-r/-e}" | |
| } |
这两天过了遍Lua,Lua的一个语言特性是支持尾递归,这是我接触的第一个支持尾递归的语言(尾递归优化)
尾递归,是尾调用的一种类型,后者更加准确,因为实际的正确尾递归(Proper Tail Recursion)是不涉及递归的。尾调用是指一个函数里的最后一个动作是一个函数调用的情形:即这个调用的返回值直接被当前函数返回的情形。这种情形下称该调用位置为尾位置。若这个函数在尾位置调用本身(或是一个尾调用本身的其他函数等等),则称这种情况为尾递归,是递归的一种特殊情形。尾调用不一定是递归调用,但是尾递归特别有用,也比较容易实现。
我们直接的来看一下Lua中尾调用:
function f(x)#参考资料
###下载单个文件,默认将输出打印到标准输出中(STDOUT)中
curl http://www.centos.org
| man() { | |
| env \ | |
| LESS_TERMCAP_mb=$(printf "\e[1;31m") \ | |
| LESS_TERMCAP_md=$(printf "\e[1;31m") \ | |
| LESS_TERMCAP_me=$(printf "\e[0m") \ | |
| LESS_TERMCAP_se=$(printf "\e[0m") \ | |
| LESS_TERMCAP_so=$(printf "\e[1;44;33m") \ | |
| LESS_TERMCAP_ue=$(printf "\e[0m") \ | |
| LESS_TERMCAP_us=$(printf "\e[1;32m") \ | |
| man "$@" |
| #!/usr/bin/env bash | |
| set -e | |
| set -x | |
| [ "${DYNAMODB_HOME}" = "" ] && DYNAMODB_HOME=/opt/dynamodb | |
| DYNAMODB_FILE=dynamodb_local_latest.tar.gz | |
| DYNAMODB_URL=http://dynamodb-local.s3-website-us-west-2.amazonaws.com/${DYNAMODB_FILE} | |
| DYNAMODB_JAR=DynamoDBLocal.jar | |
| DYNAMODB_LOG=/var/log/dynamodb.log |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure(2) do |config| | |
| # The most common configuration options are documented and commented below. | |
| # For a complete reference, please see the online documentation at |
| import time | |
| from datetime import datetime, date | |
| # 今天 | |
| datetime.datetime.today().date().isoformat() | |
| # 通过日期对象生成时间戳 | |
| int(time.mktime(datetime.now().timetuple())) | |
| # 通过时间戳生成日期对象,timestamp 的时间戳以秒为单位 |