Skip to content

Instantly share code, notes, and snippets.

@mistrydarshan99
mistrydarshan99 / WrapGridLayoutManager.java
Last active May 31, 2016 08:23 — forked from ArthurSav/WrapGridLayoutManager.java
GridLayoutManager with working wrap_content.
package com.inperson.android.utils.leastview;
import android.content.Context;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
public class WrappableGridLayoutManager extends GridLayoutManager {
git reflog expire --all --expire=now
git gc --prune=now --aggressive
@rhythnic
rhythnic / us-states.json
Last active August 11, 2021 06:31
Name, abbreviation, and numeric code for all 50 US states and some territories.
[
{
"id": "01",
"name": "Alabama",
"abbr": "AL"
},
{
"id": "02",
"name": "Alaska",
"abbr": "AK"
@kmansoft
kmansoft / find_missing_translations.py
Created July 3, 2012 09:22
A simple script to find missing translations in an Android project
#!/usr/bin/python
'''
This script finds missing string translations in Android applicaitons.
Author: Kostya Vasilyev. License: Creative Commons Attribution.
The output format is, I believe, more suitable to working with external
translators than the output of Lint from the Android SDK.
@robmathers
robmathers / groupBy.js
Created October 25, 2018 23:18
A more readable and annotated version of the Javascript groupBy from Ceasar Bautista (https://stackoverflow.com/a/34890276/1376063)
var groupBy = function(data, key) { // `data` is an array of objects, `key` is the key (or property accessor) to group by
// reduce runs this anonymous function on each element of `data` (the `item` parameter,
// returning the `storage` parameter at the end
return data.reduce(function(storage, item) {
// get the first instance of the key by which we're grouping
var group = item[key];
// set `storage` for this instance of group to the outer scope (if not empty) or initialize it
storage[group] = storage[group] || [];
@aallan
aallan / mac-vendor.txt
Last active April 27, 2024 19:26
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?