This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.xxx"> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> | |
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
<!-- RNFirebase notifications --> | |
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | |
<uses-permission android:name="android.permission.VIBRATE" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Works with this typeahead https://github.com/bassjobsen/Bootstrap-3-Typeahead | |
// but its easy to change to another lib | |
import * as React from 'react'; | |
const $ = window.$; | |
export interface SearchParams { | |
query: string; | |
callback: (items: any) => void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"start": "./node_modules/.bin/ts-node ./server.ts", | |
"watch": "./node_modules/.bin/nodemon -V -w . --ext \".ts\" --exec \"npm run start\"" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true" | |
tools:context="com.amla.pruebaconradiotulsdk.ItemDetailActivity" | |
tools:ignore="MergeRootFrame"> | |
<android.support.design.widget.AppBarLayout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Publish AAR to jCenter and Maven Central | |
================= | |
[](http://twitter.com/lopezmikhael) | |
Now I'm going to list how to publish an Android libray to jCenter and then syncronize it with Maven Central: | |
1. I use "Android Studio" and I have this simple android lib that I would like to be available on maven: [CircularImageView](https://github.com/lopspower/CircularImageView) | |
2. In the library folder(module) I have the lib code abovementioned. And applying in the build.gradle of this folder `apply plugin: 'com.android.library'` I got as output an .aar in the build/outputs/aar/ directory of the module's directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Original code https://gist.github.com/nordyke/1524046#file-multisortcollection-js-L44 | |
function sortAthletes(athletes){ | |
//points is the first criteria | |
//we sort athletes by points and make a group for all wich have the same points | |
var sortedGroups = _(athletes.models).chain(). | |
sortBy(function (model) { | |
return -model.get('points'); | |
}). | |
groupBy(function (model) { | |
return -model.get('points'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Define the base model | |
var BaseModel = Backbone.Model.extend({ | |
toJSON: function(options) { | |
options = options || {}; | |
var json; | |
if(!!options.whiteList) | |
json = _.pick(this.attributes, options.whiteList); | |
else if(!!options.blackList) | |
json = _.omit(this.attributes, options.blackList); | |
else |
NewerOlder