Skip to content

Instantly share code, notes, and snippets.

@derekcsm
derekcsm / install-recollect-alpha.md
Last active February 18, 2021 00:11
How to install Recollect Alpha

Installing Recollect Alpha in Chrome

  1. Sync the "recollect-alpha" dropdox folder to your computer
  2. Open Chrome
  3. In the address bar go to chrome://extensions
  4. Enable developer mode in the top right corner
  5. Click the "load unpacked" button and select the "build" folder that dropbox synced to your computer
  6. Open a new tab or click on the Recollect icon to get started!

  • If you encounter a blank screen after an update, go to chrome://extensions and refresh the extension
@derekcsm
derekcsm / dimens.xml
Created April 11, 2020 01:30
Android project starter dimensions file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- keylines -->
<dimen name="first_keyline">16dp</dimen>
<dimen name="first_keyline_half">8dp</dimen>
<dimen name="first_keyline_quarter">4dp</dimen>
<dimen name="second_keyline">72dp</dimen>
<dimen name="second_keyline_half">36dp</dimen>
<dimen name="dialog_padding">24dp</dimen>
@derekcsm
derekcsm / gist:e9683a1692ceeaaf62d6
Created January 2, 2016 06:46 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@derekcsm
derekcsm / FontFactory.java
Last active August 29, 2015 14:22
Font Factory [Roboto & Roboto Condensed]
package com.derek_s.hubble_gallery.utils.ui;
import android.content.Context;
import android.graphics.Typeface;
import com.derek_s.hubble_gallery.R;
/**
* To use: tv1.setTypeface(FontFactory.getRegular(getContext());
*/
@derekcsm
derekcsm / psuedo
Last active August 29, 2015 14:15
Psuedo code main activity & fragment core lifecycle and state design
MAIN ACTIVITY —
String sockToken;
String sockUrl;
ChannelFragment mChannelFragment;
onCreate(Bundle savedState) {
super.onCreate(savedState);
if (savedState != null) {
@derekcsm
derekcsm / ActMain.java
Last active August 29, 2015 14:15
ActMain
public class ActMain extends ActionBarActivity {
private Toolbar mToolbar;
private android.support.v7.app.ActionBar abMain = null;
// https://gist.github.com/castorflex/4e46a9dc2c3a4245a28e
public static CircleProgressView mProgressToolbar;
@Override
public void onCreate(Bundle savedInstanceState) {
@derekcsm
derekcsm / toolbar style
Created February 10, 2015 02:49
Toolbar style
<style name="toolbar_style" parent="">
<item name="popupTheme">@style/toolbar_popup_style</item>
<item name="theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
</style>
<style name="toolbar_popup_style" parent="Theme.AppCompat">
<item name="colorAccent">@color/accent</item>
</style>
@derekcsm
derekcsm / toolbar.xml
Created February 10, 2015 02:29
toolbar
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
style="@style/toolbar_style"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="?actionBarSize"
android:background="@color/actionbar_color">
<com.metalab.flow.viewanimations.CircleProgressView
@derekcsm
derekcsm / act_main.xml
Last active August 29, 2015 14:15
act_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"