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
/* | |
Basic ColorPicker for Flutter | |
FFeu (https://github.com/ffeu) 2018-04 | |
onSelected callback function can be used to detect which color was selected | |
OR | |
you can simply use a Dialog like this: |
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
#!/bin/bash | |
# https://gist.github.com/ffeu/7905139fabd76e8030fa6161a12b2f6b | |
if [ -z "$*" ] ; then | |
echo "No arguments provided. Usage:" | |
echo "" | |
echo "./rip_dvd.sh <input_vob_file> <output_avi_file>" | |
echo "" | |
exit 0 | |
fi |
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'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( |
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
class ClangFormatAT5 < Formula | |
desc "Formatting tool for C/C++/Java/JavaScript/Objective-C/Protobuf" | |
homepage "https://releases.llvm.org/5.0.2/tools/clang/docs/ClangFormat.html" | |
version "5.0.2" | |
if MacOS.version >= :sierra | |
url "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_502/final/", :using => :svn | |
else | |
url "http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_502/final/", :using => :svn | |
end |
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
class ClangFormatAT7 < Formula | |
desc "Formatting tool for C/C++/Java/JavaScript/Objective-C/Protobuf" | |
homepage "https://releases.llvm.org/7.0.0/tools/clang/docs/ClangFormat.html" | |
version "7.0.0" | |
if MacOS.version >= :sierra | |
url "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_700/final/", :using => :svn | |
else | |
url "http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_700/final/", :using => :svn | |
end |
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/material.dart'; | |
void main() => runApp(MyApp()); | |
const title = "PopupMenuButton test"; | |
class MyItem { | |
MyItem(this.icon, this.title); | |
final IconData icon; |
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/material.dart'; | |
import 'package:flutter_reorderable_list/flutter_reorderable_list.dart'; | |
class MyHomePage extends StatefulWidget { | |
@override | |
_MyHomePageState createState() => _MyHomePageState(); | |
} | |
class _MyHomePageState extends State<MyHomePage> { | |
List<MyItem> _sampleItems; |
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/material.dart'; | |
import 'package:flutter_reorderable_list/flutter_reorderable_list.dart'; | |
enum ReorderableListSimpleSide {Right, Left} | |
class ReorderableListSimple extends StatefulWidget { | |
ReorderableListSimple({ | |
@required this.children, | |
@required this.onReorder, | |
this.allowReordering = true, |
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/material.dart'; | |
import 'reorderable_list_simple.dart'; | |
const title = "ReorderableListSimple demo"; | |
class MyHomePage extends StatefulWidget { | |
@override | |
_MyHomePageState createState() => _MyHomePageState(); | |
} |
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
for fullpath in "$@" | |
do | |
dir="$(/usr/bin/dirname $fullpath)" | |
filename="${fullpath##*/}" # Strip longest match of */ from start | |
base="${filename%.[^.]*}" # Strip shortest match of . plus at least one non-dot char from end | |
ext="${filename:${#base} + 1}" # Substring from len of base thru end | |
if [[ -z "$base" && -n "$ext" ]]; then # If we have an extension and no base, it's really the base | |
base=".$ext" | |
ext="" | |
fi |