Skip to content

Instantly share code, notes, and snippets.

View mucyomiller's full-sized avatar
🔥
kernel panic

Mucyo Fred mucyomiller

🔥
kernel panic
View GitHub Profile
<alignment jcr:primaryType="nt:unstructured"
name="./alignChildren"
fieldLabel="Alignment of components"
required="{Boolean}true"
selectionMode="single"
sling:resourceType="granite/ui/components/coral/foundation/form/buttongroup">
<items jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured"
name="./default"
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],
@JamieMason
JamieMason / group-objects-by-property.md
Created September 14, 2018 07:38
Group Array of JavaScript Objects by Key or Property Value

Group Array of JavaScript Objects by Key or Property Value

Implementation

const groupBy = key => array =>
  array.reduce((objectsByKeyValue, obj) => {
    const value = obj[key];
    objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
    return objectsByKeyValue;
@gildaswise
gildaswise / rounded_modal.dart
Last active October 7, 2021 09:39
A custom implementation of the showModalBottomSheet, with rounded corners
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.
@SergeyLipko
SergeyLipko / RN_flatList_example.js
Created May 29, 2017 18:21
Example of using RN FlatList component with pagination and pull-refreshing
import React from 'react';
import {
View,
Text,
FlatList,
StyleSheet
} from 'react-native';
import { ListItem } from 'react-native-elements';
class Users extends React.Component {
@fokusferit
fokusferit / enzyme_render_diffs.md
Last active June 18, 2024 11:27
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
<alignment jcr:primaryType="nt:unstructured"
name="./alignChildren"
fieldLabel="Alignment of components"
required="{Boolean}true"
selectionMode="single"
sling:resourceType="granite/ui/components/coral/foundation/form/buttongroup">
<items jcr:primaryType="nt:unstructured">
<default jcr:primaryType="nt:unstructured"
name="./default"
@HeikoMamerow
HeikoMamerow / Nginx-make.txt
Last active February 9, 2022 13:23
Build nginx with Google PageSpeed, Brotli and other modules
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
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"fmt"
"io"
@mannodermaus
mannodermaus / CustomSSLSocketFactory.java
Last active June 7, 2022 18:20
Android SSLSocketFactory for use with custom CA
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;