Skip to content

Instantly share code, notes, and snippets.

View johnjohndoe's full-sized avatar

Tobias Preuss johnjohndoe

View GitHub Profile
@johnjohndoe
johnjohndoe / apt-packages
Last active October 18, 2020 13:30
Ubuntu APT packages
alacarte
brasero
brave-browser
caffeine
charles-proxy
chromium-browser
clamav
clamtk
compiz-plugins-extra
compizconfig-settings-manager
package com.yourpackage.android;
import android.content.Context;
import android.support.annotation.CallSuper;
import android.support.annotation.IdRes;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
package com.yourpackage.android;
import android.content.Context;
import android.os.Parcelable;
import android.support.annotation.IdRes;
import android.support.annotation.IntRange;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.util.SparseArray;
import android.view.LayoutInflater;
@duretti
duretti / pull_request_template.md
Last active August 3, 2016 18:04
Pull request template

Overview

Here, you might lay out the reasons behind writing this code. You can link to specs, issues, or bugs in order to give someone a better idea of how a decision was made. This is your chance to give context to your reviewer. Ego depletion - the idea that willpower is used up over time - can be easily applied to your reviewer. We are human, after all. You'll likely get one shot at a quality review, so help your reviewer help you. Flush out this section.

Testing

How did you test this code? Did you write a unit test, or test it manually? Can you provide an animated gif or a screenshot to demonstrate your code does what it purports to do? What about test output or a useful snippet from a logfile? Help show that your code works.

🚨🚨🚨 (Risks)

Is there some part of the code that you know probably doesn't work as it should? Call out potential weak spots, and get help addressing them.

@tasomaniac
tasomaniac / screenrecord.sh
Last active June 28, 2022 22:05 — forked from PaulKinlan/getdeviceart.sh
Screen Record for Android
#!/bin/sh
set -e
if [ -z "$1" ]; then
shot_path=$(date +%Y-%m-%d-%H-%M-%S).mp4
else
shot_path="$*"
fi

LED Table @ FFII

This is a 20x14 Pixels LED table. Each of the pixels can display almost all colors.

You can play the game with the controllers. It is in ffii.ino on this page. You will need to upload it, see Programming. If you would like to see the making of the LED table, you can visit Youtube. If you have any questions, you can leave a comment below or contact me via email.

Usage

To use the LED table you can plug it into the power plug in the wall. If you would like to use the controllers, one of their ends should be plugged into A0 or A1 or A2 or A3 on the Arduino and the other end into Ground or GND or the blue line on the breadboard. You will notice if they are not plugged in correctly: They will not work. In rar cases where you connect 5V and ground directly to eachother, you will melt the cables or destroy the Arduino. Do not do that.

@neworld
neworld / howto.md
Last active September 15, 2020 11:32
How to make faster Android build without sacrificing new api lint check

Original solution sacrifices new api lint check.

Here my solution:

int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16

apply plugin: 'com.android.application'

android {
 compileSdkVersion 23
@JakeWharton
JakeWharton / Java6.java
Last active May 28, 2022 16:14
A comparison between non-capturing and capturing expressions across Java 6, Java 8, Java 8 with Retrolambda, Kotlin with native function expressions, and Kotlin with Java SAM expression.
import java.util.Arrays;
class NonCapturing {
public static void main(String... args) {
run(new Runnable() {
@Override public void run() {
System.out.println("Hey!");
}
});
}
@bittner
bittner / 60-jetbrains.conf
Created September 25, 2015 07:57
Inotify configuration for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). Create this file with e.g. `sudo vim /etc/sysctl.d/60-jetbrains.conf`
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm).
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and
# run `sudo service procps start` or reboot.
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
#
# More information resources:
# -$ man inotify # manpage
# -$ man sysctl.conf # manpage
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use
package com.bigoven.android.widgets;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v7.widget.AppCompatAutoCompleteTextView;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.MotionEvent;