Skip to content

Instantly share code, notes, and snippets.

View brnhffmnn's full-sized avatar
🤹‍♂️
TODO()

Brian Hoffmann brnhffmnn

🤹‍♂️
TODO()
View GitHub Profile
@brnhffmnn
brnhffmnn / FragmentListActivity.java
Created December 4, 2012 08:12
Copy of ListActivity from Android source to enable Fragment support
/*
* Copyright (C) 2006 The Android Open Source Project
*
* 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 distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
@brnhffmnn
brnhffmnn / RotationAwareAsyncTask.java
Created December 11, 2012 08:40
An AsyncTask which is able to continue the work and update progress state even during configuration changes
package de.slowpoke;
import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
/**
@brnhffmnn
brnhffmnn / IcsListPopupWindow
Created June 11, 2013 09:34
ActionBarSherlock: IcsListPopupWindow screen clipping method. Untested. Call in show(): mPopup.setWindowLayoutMode(widthSpec, heightSpec); applyClipToScreen(); //XXX mPopup.setClipToScreenEnabled(true);
protected void applyClipToScreen() {
final WindowManager.LayoutParams p = (LayoutParams) mPromptView.getLayoutParams();
mDropDownAnchorView.getLocationOnScreen(mScreenLocation);
final Rect displayFrame = new Rect();
mDropDownAnchorView.getWindowVisibleDisplayFrame(displayFrame);
final int displayFrameWidth = displayFrame.right - displayFrame.left;
int right = p.x + p.width;
@brnhffmnn
brnhffmnn / OkHttpStack.java
Created September 2, 2014 07:54
Volley + OkHttp
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.net.ssl.SSLSocketFactory;
import com.android.volley.toolbox.HurlStack;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.OkUrlFactory;
@brnhffmnn
brnhffmnn / designer.html
Last active August 29, 2015 14:22
designer
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<polymer-element name="my-element">
<template>
@brnhffmnn
brnhffmnn / install_taiga_uberspace.md
Last active November 22, 2015 20:47 — forked from shuairan/install_taiga_uberspace.md
Taiga.io Backend und Frontend auf Uberspace installieren
@brnhffmnn
brnhffmnn / latex-pdf-glossary+acronym.tco
Created November 8, 2017 20:44
Latex Glossaries with TeXnicCenter Output profile
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<txcop:outputProfiles version="1" xmlns:txcop="http://schemas.ToolsCenter.org/TeXnicCenter/OutputProfiles.xsd">
<outputProfileList>
<outputProfile name="LaTeX &#8680; PDF (Glossary+Acronym)" stopOnLatexError="false">
<texCommand execute="true" path="pdflatex.exe" arguments="-interaction=nonstopmode -max-print-line=120 &quot;%pm&quot;"/>
<bibTexCommand execute="true" path="bibtex.exe" arguments="&quot;%bm&quot;"/>
<makeIndexCommand execute="true" path="makeindex.exe" arguments="&quot;%bm&quot;"/>
<postProcessors>
<processor name="makeglossaries #1" path="makeindex.exe" arguments="-s &quot;%bm&quot;.ist -t &quot;%bm&quot;.glg -o &quot;%bm&quot;.gls &quot;%bm&quot;.glo" inputFile="" outputFile=""/>
<processor name="makeacronyms #1" path="makeindex.exe" arguments="-s &quot;%bm&quot;.ist -t &quot;%bm&quot;.alg -o &quot;%bm&quot;.acr &quot;%bm&quot;.acn" inputFile="" outputFile=""/>