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
logcat-color --no-wrap 'TAG1:D TAG2:D AndroidRuntime:E *:S' | |
logcat-color --no-wrap 'TAG:E TAG2:E AndroidRuntime:E VOLOG:E *:S' |
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
(define-minor-mode lang-mode | |
"Lang mode" | |
:lighter " lang") | |
(require 'thingatpt) | |
(defun tabs-raw () | |
(shell-command-to-string "chrome-cli list tabs")) |
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
sayFinnish = function() { | |
text = $('.dictionarySearchInput').val() | |
console.log(text) | |
say(text, 'fi-fi') | |
} | |
$(window).load(function() { | |
$('.dictionarySearchInput').addClass('mousetrap') | |
$('.language-switch').prepend('<div id="so-augumented"/>') | |
$('#so-augumented').append('<a href="javascript:void(0)" onclick="sayFinnish()" class="audio"><span class="fa fa-volume-up" style="font-size:45px;color:red;"></span></a>') |
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 weather() { | |
LANG_BACK=$LANG | |
LANG=uk_UA.UTF-8 | |
curl -s -H "Accept-Language: ${LANG%_*}" "wttr.in/$1" | sed '$ d' | sed '$ d' | |
LANG=$LANG_BACK | |
} |
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 android.app.Activity; | |
import android.app.Application; | |
import android.os.Bundle; | |
public class FilteredActivityLifecycleCallbacks<T extends Activity> implements Application.ActivityLifecycleCallbacks { | |
private final Application.ActivityLifecycleCallbacks callbacks; | |
private Class<T> aClass; | |
public FilteredActivityLifecycleCallbacks(Application.ActivityLifecycleCallbacks callbacks, Class<T> aClass) { |
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
adb shell input text "text" | |
adb shell input keyevent 4 # back | |
adb shell input keyevent 23 # enter |
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
adb shell content query --uri 'content://android.media.tv/channel' |
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 android.database.Cursor; | |
import android.database.CursorWrapper; | |
public class QueryUtils { | |
public static String buildSelections(String[] projection) { | |
return buildSelections(projection, null); | |
} | |
public static String buildSelections(String[] projection, String tableAlias) { |
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 android.content.Context; | |
import android.content.res.Resources; | |
import android.content.res.TypedArray; | |
import android.graphics.drawable.Drawable; | |
import android.text.Html; | |
import android.text.Html.ImageGetter; | |
import android.text.Spanned; | |
import android.util.AttributeSet; | |
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
import android.net.Uri; | |
import com.google.gson.JsonDeserializationContext; | |
import com.google.gson.JsonDeserializer; | |
import com.google.gson.JsonElement; | |
import com.google.gson.JsonParseException; | |
import com.google.gson.JsonPrimitive; | |
import com.google.gson.JsonSerializationContext; | |
import com.google.gson.JsonSerializer; |