const groupBy = key => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = obj[key];
objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
return objectsByKeyValue;
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
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
const List<List<int>> _pixels = [ | |
[1, 1, 1, 1, 0, 0, 1, 1, 0], | |
[1, 0, 0, 0, 0, 1, 0, 0, 1], | |
[1, 1, 1, 0, 0, 1, 0, 0, 1], | |
[0, 0, 0, 1, 0, 1, 0, 0, 1], |
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
import 'dart:async'; | |
import 'package:flutter/material.dart'; | |
/// Below is the usage for this function, you'll only have to import this file | |
/// [radius] takes a double and will be the radius to the rounded corners of this modal | |
/// [color] will color the modal itself, the default being `Colors.white` | |
/// [builder] takes the content of the modal, if you're using [Column] | |
/// or a similar widget, remember to set `mainAxisSize: MainAxisSize.min` | |
/// so it will only take the needed space. |
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
import React from 'react'; | |
import { | |
View, | |
Text, | |
FlatList, | |
StyleSheet | |
} from 'react-native'; | |
import { ListItem } from 'react-native-elements'; | |
class Users extends React.Component { |
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
How to build your custom Nginx | |
============================== | |
Works fine for me with Ubuntu 16.04. | |
Automated Install with pagespeed module (Google) | |
------------------------------------------------ | |
If you interested, read the original | |
Source: https://developers.google.com/speed/pagespeed/module/build_ngx_pagespeed_from_source |
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
package com.github.aurae.ssl; | |
import android.content.Context; | |
import android.support.annotation.RawRes; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.security.KeyStore; | |
import java.security.SecureRandom; | |
import java.security.cert.Certificate; |
NewerOlder