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
# brew install jq is required | |
system_profiler SPPowerDataType -json | jq '.SPPowerDataType[] | select(._name == "sppower_ac_charger_information").sppower_ac_charger_watts | tonumber' # eg response | |
# response example: 87 |
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
const childProcess = require('child_process'); | |
/** | |
* use `page.modified` in your theme | |
*/ | |
hexo.extend.filter.register('before_post_render', function (data) { | |
data.title = data.title.toLowerCase(); | |
data.modified = git_log(data.full_source) | |
return data; | |
}); |
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
/** | |
* Created by Miao1007 on 2/2/15. | |
* | |
* Original Code: https://gist.github.com/miao1007/3f7e9b5f011fc188eba6 | |
*/ | |
public class GradientTransformation implements Transformation { | |
int startColor = Color.argb(240,0,0,0); | |
int endColor = Color.TRANSPARENT; |
OlderNewer