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
function MET(type, speed) { | |
var STANDING_QUIETLY = 1.3; | |
var WALK_MET_TABLE = [ | |
[5.0 * 1.6, 8.3], // 5.0 mph, 8.3 METs | |
[4.5 * 1.6, 7.0], // 4.5 mph, 7.0 METs | |
[4.0 * 1.6, 5.0], // 4.0 mph, 5.0 METs | |
[3.5 * 1.6, 4.3], // 3.5 mph, 4.3 METs | |
[2.5 * 1.6, 3.0], // 2.5 mph, 3.0 METs |
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/bash | |
# Submit latest git commit. | |
# Usage: | |
# submit-latest.sh [topic] | |
# | |
# Reset | |
Color_Off='\033[0m' | |
# Regular Colors |
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
# Reset | |
Color_Off='\033[0m' # Text Reset | |
# Regular Colors | |
Color_Black='\033[0;30m' # Black | |
Color_Red='\033[0;31m' # Red | |
Color_Green='\033[0;32m' # Green | |
Color_Yellow='\033[0;33m' # Yellow | |
Color_Blue='\033[0;34m' # Blue | |
Color_Purple='\033[0;35m' # Purple |
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
for (Field field : Build.class.getFields()) { | |
try { | |
if (field.getType().isAssignableFrom(String.class)) { | |
Timber.d("%16s: %s", field.getName(), field.get(null)); | |
} | |
} catch (IllegalAccessException e) { | |
Timber.w(e, "Failed to print %s", field.getName()); | |
} | |
} |
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
package me.tankery.mediabox.encoder; | |
import android.annotation.SuppressLint; | |
import android.media.MediaCodec; | |
import android.media.MediaCodecInfo; | |
import android.media.MediaFormat; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; |
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
<snippet> | |
<description>ifndef (…)</description> | |
<content><![CDATA[#ifndef $1 | |
#define ${1:${TM_FILEPATH/(([A-Za-z]+)\/((inc)|(include)|(src)|(source))\/)|./\U(?1:$2_)\E/g}${TM_FILENAME/(([A-Z])([A-Z][a-z]))|(([a-z])([A-Z]))|([a-z])|(\.)/\U(?1:$2_$3)(?4:$5_$6)$7(?8:_)\E/g}} | |
${0:$SELECTION} | |
#endif // $1 | |
]]></content> |