Skip to content

Instantly share code, notes, and snippets.

Battery Rapid Charge, Integrated
System Unit Intel i5-5300U 8GB
ITC - Imaging Service 4 NONE
ITC - Imaging Service 5 NONE
ITC - Imaging Service 6 NONE
ITC - Project Type NONE
ITC - Who Created The Image NONE
Camera 720p HD Camera
Shipping Country USA
AC Adapter and Power Cord 65W AC Adpt US (2pin)
@file:JvmName("ActivityUtils")
package io.dwak.sleepcyclealarm.extension
import android.app.Activity
import android.support.annotation.StringRes
import android.widget.Toast
@JvmOverloads
fun Activity.toast(message : String, length : Int = Toast.LENGTH_SHORT) {
<RelativeLayout
android:layout_gravity="bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
tools:text="diw"
android:id="@+id/text_view_a"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
final class Lumberjack {
static void log(final String tag, final String message, final LogLevel level) {
if (Reactor.getInstance().shouldLog()) {
if (Reactor.getInstance().getLogLevel().logLevelValue >= level.logLevelValue) {
if (Reactor.getInstance().getLog() != null) {
Reactor.getInstance().getLog().log(message);
}
else {
Log.d(tag, message);
}
fun expandColor(colorString : String) : String {
return if (colorString.length() <= 4) {
"${colorString[0]}${colorString[1]}${colorString[1]}${colorString[2]}${colorString[2]}${colorString[3]}${colorString[3]}"
}
else {
colorString
}
}
@burntcookie90
burntcookie90 / SpacesItemDecoration.java
Created January 27, 2015 20:55
add margins to recyclerview items
public class SpacesItemDecoration extends RecyclerView.ItemDecoration {
private final int mSpace;
public SpacesItemDecoration(int space) {
this.mSpace = space;
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
outRect.left = mSpace;
package io.dwak.androidtracker.viewmodel;
import io.dwak.tracker.TrackerDependency;
/**
* Created by vishnu on 12/23/14.
*/
public class FavoriteFoodViewModel {
public static String PIZZA = "PIZZA";
public static String MANGOES = "MANGOES";
#! /bin/sh
for a in *.flac; do
OUTF=${a%.flac}.mp3
ARTIST=`metaflac "$a" --show-tag=ARTIST | sed s/.*=//g`
TITLE=`metaflac "$a" --show-tag=TITLE | sed s/.*=//g`
ALBUM=`metaflac "$a" --show-tag=ALBUM | sed s/.*=//g`
GENRE=`metaflac "$a" --show-tag=GENRE | sed s/.*=//g`
TRACKNUMBER=`metaflac "$a" --show-tag=TRACKNUMBER | sed s/.*=//g`
Dec 06 16:32:27 raptor kernel: chromium[23185]: segfault at 7 ip 00007f7c0715acfa sp 00007fff913ed9c0 error 4 in chromium[7f7c055cd000+6499000]
Dec 06 16:32:32 raptor /etc/gdm/Xsession[3718]: Window manager warning: Log level 8: meta_window_focus: assertion '!window->override_redirect' failed
Dec 06 16:34:51 raptor /etc/gdm/Xsession[3718]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2a2b367 (Open Resou)
Dec 06 16:34:56 raptor /etc/gdm/Xsession[3718]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2a00156 (C/C++ - Pr)
Dec 06 16:35:02 raptor /etc/gdm/Xsession[3718]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2a2ba32 (Open Resou)
Dec 06 16:35:05 raptor /etc/gdm/Xsession[3718]: Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x2a00156 (C/C++ - Pr)
Dec 06 16:35:11 raptor /etc/gdm/Xsession[3718]: Window man
D Forward: true degrees: 340.61597
D Forward: true degrees: 345.33337
D Forward: true degrees: 348.86758
D Forward: true degrees: 351.6056
D Forward: true degrees: 354.26114
D Forward: true degrees: 356.31287
D Forward: true degrees: 358.0052
D Forward: true degrees: 359.1855
D Forward: true degrees: 359.84686
D Forward: true degrees: 360.0