Skip to content

Instantly share code, notes, and snippets.

View notdrone's full-sized avatar
🦊

droan notdrone

🦊
View GitHub Profile
@developit
developit / *constant-locals-loader.md
Last active February 4, 2022 17:15
Inline Webpack CSS Modules classNames, reducing bundle size. https://npm.im/constant-locals-loader

constant-locals-loader for Webpack

This loader optimizes the output of mini-css-extract-plugin and/or css-loader, entirely removing the potentially large CSS classname mappings normally inlined into your bundle when using CSS Modules.

Run npm install constant-locals-loader, then make these changes in your Webpack config:

module.exports = {
 module: {
@chrisbanes
chrisbanes / CollapsingTitleLayout.java
Last active March 26, 2023 11:58
CollapsingTitleLayout
/*
* Copyright 2014 Chris Banes
*
* 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
@ec84b4
ec84b4 / gist:d56c00fb5fd2dfaf279b
Last active June 26, 2018 06:22
recycler view header adapter
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
/**
* Created by khaled bakhtiari on 10/26/2014.
* <a href="http://about.me/kh.bakhtiari">
*/
@arthurnn
arthurnn / LoginActivity.java
Created September 4, 2012 19:02
Login example using 500px android sdk
public class LoginActivity extends Activity implements XAuth500pxTask.Delegate{
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
XAuth500pxTask loginTask = new XAuth500pxTask(this);
loginTask.execute(getString(R.string.px_consumer_key), getString(R.string.px_consumer_secret),"username","pass");
}