Skip to content

Instantly share code, notes, and snippets.

View mdumrauf's full-sized avatar

Matías Dumrauf mdumrauf

  • Buenos Aires, Argentina
View GitHub Profile
@VladSumtsov
VladSumtsov / MyActivity.java
Last active July 29, 2019 10:09
RecycleView PullToRefresh SwipeRefreshLayout
import android.graphics.Color;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import com.togethernetworks.basesdk.BaseActivity;
import com.togethernetworks.gallery.samples.mortar.UiModule;
@geftimov
geftimov / android-connectivity-change
Last active August 1, 2018 15:16
Register and unregister connectivity receiver when needed.
private ConnectivityChangeReceiver mConnectivityChangeReceiver;
@Override
protected void onResume() {
super.onResume();
mConnectivityChangeReceiver = new ConnectivityChangeReceiver();
registerReceiver(mConnectivityChangeReceiver, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
}
@Override
@backpackerhh
backpackerhh / core-set.sql
Last active March 17, 2024 05:03
SQL - Movie-Rating Query Exercises
-- 1. Find the titles of all movies directed by Steven Spielberg.
SELECT title
FROM Movie
WHERE director = 'Steven Spielberg';
-- 2. Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order.
SELECT DISTINCT year
@lecho
lecho / shadow.xml
Created September 7, 2013 07:01
Android shadow drawable xml.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Drop Shadow Stack -->
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
@facultymatt
facultymatt / roles_invesitgation.md
Last active April 16, 2024 09:31
Roles and permissions system for Nodejs
@julianshen
julianshen / CircleTransform.java
Last active November 6, 2023 12:47
CircleTransform for Picasso
/*
* Copyright 2014 Julian Shen
*
* 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
@MobiDevelop
MobiDevelop / ArchiveFileHandle.java
Created May 3, 2013 21:28
A ZipFile-based FileHandle implementation for LibGDX.
package com.mobidevelop.gdx.examples;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import com.badlogic.gdx.Files.FileType;
import com.badlogic.gdx.files.FileHandle;
@christopherperry
christopherperry / CheckableLinearLayout
Created September 18, 2012 22:43
A LinearLayout that implements the Checkable interface, allowing a LinearLayout to be put into a checked state.
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Checkable;
import android.widget.LinearLayout;
@OnesimusUnbound
OnesimusUnbound / quote.txt
Last active August 16, 2023 16:24
Programming Quotes
[T]he difference between a bad programmer and a
good one is whether he considers his code or his
data structures more important. Bad programmers
worry about the code. Good programmers worry about
data structures and their relationships.
-- Linus Torvalds
~~~
Clarity and brevity sometimes are at odds.
When they are, I choose clarity.
-- Jacob Kaplan-Moss
@necolas
necolas / gist:2215692
Created March 27, 2012 13:12
Git submodules
# Workflow from https://github.com/necolas/dotfiles
# Add the new submodule
git submodule add git://example.com/remote/path/to/repo.git vim/bundle/one-submodule
# Initialize the submodule
git submodule init
# Clone the submodule
git submodule update
# Stage the changes
git add vim/bundle/one-submodule