This file contains hidden or 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/material.dart'; | |
import 'package:provider/provider.dart'; | |
void main() => runApp(MyApp()); | |
class Store extends ChangeNotifier { | |
final createdAt = DateTime.now(); | |
dispose() { | |
print("store.dispose()"); |
This file contains hidden or 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:typed_data'; | |
/// Converts [input] to a Uint16. | |
/// | |
/// For example, _decodeToUint16("734c") slices [input] into 2 substrings | |
/// of 2 hexa characters ('73' and '4c') and create a Uint8 list from their | |
/// respective decimal representation (i.e. [115, 76]). | |
/// | |
/// Finally, it returns an unsigned 16-bits integer representation (little endian) | |
/// by using a [ByteData] view (i.e. '19571'). |
This file contains hidden or 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
extension UICollectionViewFlowLayout { | |
typealias DelegateMethod<Key, Value> = ((UICollectionView, UICollectionViewLayout, Key) -> Value) | |
private var delegate: UICollectionViewDelegateFlowLayout? { | |
return collectionView?.delegate as? UICollectionViewDelegateFlowLayout | |
} | |
func retrieve<Key, Value>( |
This file contains hidden or 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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
This file contains hidden or 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
#!/usr/local/bin/ruby | |
require 'rubygems' | |
require 'json' | |
fail("Input file not specified") unless ARGV.length == 1 | |
input = ARGV.first | |
fail("Input file #{input} not found") unless File.exists?(input) | |
result = JSON.parse (File.read input), :symbolize_names => true | |
icons = result[:icons] |
This file contains hidden or 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
#!/bin/sh | |
# Download the latest httpd archive from your favorite mirror | |
# Configure Apache | |
./configure \ | |
--enable-layout=Darwin \ | |
--enable-mods-shared=all \ | |
--with-mpm=prefork \ | |
--disable-unique-id \ | |
--enable-dav \ |