This file contains hidden or 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/bash -e | |
| function merge_repo_to_subdir { | |
| local url=$1 | |
| local commit=$2 | |
| local module_path=$3 | |
| if [[ -z $url || -z $commit || -z $module_path ]]; then | |
| echo "Usage: merge-repo-to-subdir.sh URL BRANCH PATH" >&2 | |
| exit 1 |
This file contains hidden or 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
| # /etc/ssh/ldap.conf | |
| # See ldap.conf(5) for details | |
| # This file should be world readable but not world writable. | |
| BASE ou=People,dc=example,dc=org | |
| URI ldap://localhost |
This file contains hidden or 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
| import java.util.ArrayList; | |
| import java.util.List; | |
| import android.content.Context; | |
| import android.graphics.Typeface; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.ArrayAdapter; | |
| import android.widget.TextView; |
This file contains hidden or 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
| public static Bitmap round(Context context, Bitmap source) { | |
| // Use the height and width of our source image as a basis | |
| int width = source.getWidth(); | |
| int height = source.getHeight(); | |
| Paint paint = new Paint(); | |
| paint.setAntiAlias(true); | |
| paint.setColor(WHITE); |
This file contains hidden or 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
| function relativeTime(milliseconds, withoutSuffix, lang) { | |
| var seconds = round(Math.abs(milliseconds) / 1000), | |
| minutes = round(seconds / 60), | |
| hours = round(minutes / 60), | |
| days = round(hours / 24), | |
| years = round(days / 365), | |
| args = seconds < 45 && ['s', seconds] || | |
| minutes === 1 && ['m'] || | |
| minutes < 45 && ['mm', minutes] || | |
| hours === 1 && ['h'] || |