Skip to content

Instantly share code, notes, and snippets.

@st-f
st-f / cv.json
Last active November 11, 2019 21:08
{
"role": "Android Developer",
"email": "jobs@st-f.net",
"phone": "07000000000",
"link": "http://linkedin.com/in/stephaneschittly",
"picture": "https://avatars0.githubusercontent.com/u/225409?s=400&v=4",
"jobs": [
{
"title": "Ostmodern",
"year": "2019",
#set
adb shell settings put global http_proxy 10.10.11.195:8888
#unset
adb shell settings put global http_proxy :0
requires to restart the app to take effect
@st-f
st-f / Download_X_Lorem_Pixel_Images.sh
Last active December 6, 2019 09:36
Download X random images from lorempixel.com
# usage : sh download.sh 100
# will download 100 pics
START=1
for i in $(eval echo "{$START..$1}")
do
curl "http://lorempixel.com/index.php?generator=1&x=640&y=480&cat=" -o temp.html && cat temp.html | sed -n 's/.*<img src="\([^" ]*\)".*/\1/p' | awk '{print "http://lorempixel.com/"$1}' | xargs curl -o $i.jpg
done
@st-f
st-f / AnimatedExpandableListView.java
Last active January 1, 2021 04:52
Animated 3 levels expandable listview (only level 1 and 2 are animated, see code for comments). Uses https://github.com/idunnololz/AnimatedExpandableListView
package net.stf.threelevelexpandablelistview;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
import android.util.SparseArray;
import android.view.View;
@st-f
st-f / ThreeLevelExpandableListView.java
Last active August 15, 2023 22:52
A 3 level expandable list view
package net.stf.threelevelexpandablelistview;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseExpandableListAdapter;
import android.widget.ExpandableListView;