Douban, Yet Another.
另一个叫豆芽的应用。
豆芽的名字取自“Douban, Yet Another”的缩写和中文词语“豆芽”的拼音正好相同的巧合。
| #!/bin/bash | |
| if [[ -z "$1" ]]; then | |
| echo "Usage: $0 ICON_SVG_FILE" >&2 | |
| exit 1 | |
| fi | |
| path_data="$(grep -oP '(?<=<path d=").*z(?="/>)' "$1")" | |
| if [[ -z "${path_data}" ]]; then | |
| echo "$1: Cannot recognize path data" >&2 | |
| exit 1 | |
| fi |
| #!/bin/bash | |
| set -e | |
| ANDROID_LIB_PATH='/opt/android-studio/plugins/android/lib/' | |
| TEMP_DIR='sdk-tools/' | |
| TEMP_FILE='sdk-tools.jar' | |
| if [[ -f "${ANDROID_LIB_PATH}/sdk-tools.jar.orig" ]]; then | |
| echo "${ANDROID_LIB_PATH}/sdk-tools.jar.orig already exists, exiting..." >&2 | |
| exit 1 |
Douban, Yet Another.
另一个叫豆芽的应用。
豆芽的名字取自“Douban, Yet Another”的缩写和中文词语“豆芽”的拼音正好相同的巧合。
| /* | |
| * Copyright (c) 2015 Zhang Hai | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| /* | |
| * Copyright (c) 2015 Zhang Hai <[email protected]> | |
| * All Rights Reserved. | |
| */ | |
| package com.example.android; | |
| import android.support.v7.widget.RecyclerView; | |
| public abstract class OnVerticalScrollListener extends RecyclerView.OnScrollListener { |
| /* | |
| * Copyright (c) 2014-2015 Zhang Hai | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| /* | |
| * Copyright (c) 2014 Zhang Hai | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| #!/bin/bash | |
| # | |
| # dpigen.sh: Script for generating image assets of different DPIs for Android from SVG source file, using Inkscape. | |
| # | |
| # Copyright (c) 2014 Zhang Hai <[email protected]> | |
| # | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. |
| /* | |
| * Copyright (c) 2014 Zhang Hai | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # unzip-gbk.py | |
| import os | |
| import sys | |
| import zipfile | |
| print u"正在处理压缩文件 %s" % sys.argv[1].decode('utf-8') | |