Skip to content

Instantly share code, notes, and snippets.

@burntcookie90
burntcookie90 / GCMRegistration.java
Created October 20, 2014 17:58
Helper for gcm registration
public class GCMRegistration {
private final static int PLAY_SERVICES_RESOLUTION_REQUEST = 9000;
private String mSenderId;
private Activity mActivity;
private GoogleCloudMessaging mGCM;
private String mRegId;
public GCMRegistration(Activity activity) {
mActivity = activity;
}
@burntcookie90
burntcookie90 / SlidingTabLayout.java
Created October 30, 2014 03:21
SlidingTabLayout from google's 2014 iosched
/*
* Copyright 2014 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="?attr/colorPrimary"/>
local/cantarell-fonts 0.0.16-1
Cantarell font family
local/fontconfig 2.11.1-1
A library for configuring and customizing font access
local/fontforge 20141014-1
Outline and bitmap font editor
local/fontsproto 2.1.3-1
X11 font extension wire protocol
TrueType font rendering library with ClearType patch
OpenGL library to use arbitrary fonts
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
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
#! /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`
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";
@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;
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
}
}