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
Picasso.with(getContext()) | |
.load(CONST.IMAGE_SERVER + cover.image_url) | |
.into(new Target() { | |
@Override | |
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom loadedFrom) { | |
Bitmap bmOverlay = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), bitmap.getConfig()); | |
Bitmap play= BBAppResource.bitmap(R.drawable.btn_me_account); | |
Canvas canvas = new Canvas(bmOverlay); | |
canvas.drawBitmap(bitmap, new Matrix(), null); | |
float left = (float)((bitmap.getWidth()-play.getWidth())/2.0); |
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/sh | |
# | |
# a simple way to parse shell script arguments | |
# | |
# please edit and use to your hearts content | |
# | |
ENVIRONMENT="dev" |
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
0 1 * * * curl https://gist.githubusercontent.com/fangzhzh/7f9ed840948e81b7fc76/raw/30f2bf8dc7606ed6d8746ec8db745fb57f42c7c5/journal_with_remind.py | python | |
0 1 * * 1 curl https://gist.githubusercontent.com/fangzhzh/7f9ed840948e81b7fc76/raw/30f2bf8dc7606ed6d8746ec8db745fb57f42c7c5/journal_with_remind.py | python /dev/stdin week | |
0 1 1 * * curl https://gist.githubusercontent.com/fangzhzh/7f9ed840948e81b7fc76/raw/30f2bf8dc7606ed6d8746ec8db745fb57f42c7c5/journal_with_remind.py | python /dev/stdin month |
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
cd ~ | |
git clone [email protected]:fangzhzh/.vim.git | |
ln -s ~/.vim/.vimrc ~/.vimrc | |
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
vim +PluginInstall +qall | |
d ~/.vim/bundle/YouCompleteMe && ./install.py --clang-completer |
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
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %Cblue<%an>%Creset' --abbrev-commit --date=relative |
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
var w = 400, | |
h = 400, | |
r = 180, | |
inner = 70, | |
color = d3.scale.category20c(); | |
data = [{"label":"ONE", "value":194}, | |
{"label":"TWO", "value":567}, | |
{"label":"THREE", "value":1314}, | |
{"label":"FOUR", "value":793}, |
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
var svg = d3.select("d3_chart"); | |
var data = [4, 8, 15, 16, 23, 42]; | |
var width = 420, barHeight = 20; | |
var svg = d3.select("d3_chart").append("svg:svg") | |
.attr("width", width) | |
.attr("height", barHeight); |
NewerOlder