Skip to content

Instantly share code, notes, and snippets.

View vovkab's full-sized avatar

Vladimir Baryshnikov vovkab

  • if(we)
  • San Francisco
View GitHub Profile
@vovkab
vovkab / android_textview_link_clickable
Created September 18, 2014 07:44
Android make link clickable inside TextView
@vovkab
vovkab / android_device_configuration
Last active February 2, 2020 11:58
Android device configurations
Google devices info:
https://design.google.com/devices/
===================== PHONES ======================
Nexus S:
{1.0 0mcc0mnc en_US sw320dp w320dp h460dp nrml port finger qwerty/v/v dpad/v s.4}
Nexus 4: xhdpi
{1.0 310mcc?mnc en_US ldltr sw384dp w384dp h567dp 320dpi nrml port finger -keyb/v/h -nav/h s.5}
@vovkab
vovkab / gradle
Created April 29, 2014 18:31
Gradle
apply from: "${rootDir}/android_common.gradle"
@vovkab
vovkab / api.youtube
Created April 26, 2014 06:53
api.youtube
List video annotation:
https://www.youtube.com/annotations_invideo?plid=bla&video_id=<video_id>
drawable-ldpi 120 dpi : 36px x 36px
drawable-mdpi 160 dpi : 48px x 48px
drawable-hdpi 240 dpi : 72px x 72px
drawable-xhdpi 320 dpi : 96px x 96px
drawable-xxhdpi 480 dpi : 144px x 144px
drawable-xxhdpi 640 dpi : 196px x 196px
@vovkab
vovkab / git
Last active January 2, 2016 03:48
# Publish local branch to repo and make it tracking:
$ git push -u origin branch_name
# List remote branches:
$ git remote show origin
# Show stale branches that will be removed:
$ git remote prune origin --dry-run
# Delete stale branches:
@vovkab
vovkab / gentoo
Last active December 31, 2015 20:49
Build or update kernel, using .config in /usr/src/linux:
# genkernel --no-mrproper --no-clean --install --oldconfig --bootloader=grub all
@vovkab
vovkab / xfce
Last active December 31, 2015 00:09
Configure desktop icons, label and position:
Create file .gtkrc-2.0 in home directory:
style "xfdesktop-icon-view" {
XfdesktopIconView::label-alpha = 0
XfdesktopIconView::selected-label-alpha = 100
XfdesktopIconView::ellipsize-icon-labels = 0
XfdesktopIconView::tooltip-size = 128
android:fontFamily="sans-serif" // roboto regular
android:fontFamily="sans-serif-thin" // roboto thin
android:fontFamily="sans-serif-light" // roboto light
android:fontFamily="sans-serif-condensed" // roboto condensed
@vovkab
vovkab / genymotion_wmctrl
Last active November 27, 2017 05:54
Change size of Genymotion emulator
To make emulator looks crystal clear, easiest way - change window size to be exact size.
On linux there is command:
wmctrl -r "win" -e G,X,Y,W,H
G - gravity
X,Y - window coords
W - width
H - height
For 1280x800 window, command will be: