pip install -r requirements.txt
<!-- Add this file to: ~/Library/Developer/Xcode/UserData/FontAndColorThemes --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>DVTConsoleDebuggerInputTextColor</key> | |
<string>0.901961 0.831373 0.639216 1</string> | |
<key>DVTConsoleDebuggerInputTextFont</key> | |
<string>SFMono-Bold - 11.0</string> | |
<key>DVTConsoleDebuggerOutputTextColor</key> |
/// This gist assumes that Flutter Blue (https://github.com/pauldemarco/flutter_blue) is used to connect to a BBC Micro:bit | |
/// and is listening to the [device.onValueChanged] for the correct characteristic ("E95DCA4B-251D-470A-A062FA1922DFA9A8") | |
/// | |
/// this will be something similar to | |
/// | |
/// device.onValueChanged( (accChar).listen( (value){ convertRawData(value)})); | |
/// | |
/// the 'raw' listen value is a List<int> of length 6 this needs to be converted into the X,Y and Z values from the | |
/// accelerometer and is done with the function below | |
/// |
class Adder implements Function { | |
call(int a, int b) => a + b; | |
} | |
class Incrementer implements Function { | |
int _amt; | |
Incrementer(this._amt); | |
call(int a) => a + _amt; | |
} |
// Copyright 2021, Thea Choem, All rights reserved. | |
import 'package:badges/badges.dart'; | |
import 'package:flutter/material.dart'; | |
class CustomTabBarItem { | |
final String label; | |
final String? value; | |
CustomTabBarItem({ |
/// Based on the answer of Przemek Broda: | |
/// https://stackoverflow.com/questions/51825779/blur-background-behind-dialog-flutter/62361699#62361699 | |
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
void showProgressView(BuildContext context, {bool dismissible = false}) { | |
showGeneralDialog( | |
context: context, | |
barrierColor: Theme.of(context).colorScheme.surface.withOpacity(0.5), |
import 'package:flutter/material.dart'; | |
class Example extends StatelessWidget { | |
const Example({Key? key}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
final colorScheme = Theme.of(context).colorScheme; |
Hello (<-- two spaces)
World
Hello
World
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32: