Skip to content

Instantly share code, notes, and snippets.

View ro0t's full-sized avatar
:octocat:
git commit -m "status"

Adam Norðfjörð Viðarsson ro0t

:octocat:
git commit -m "status"
View GitHub Profile
@ro0t
ro0t / CameraWidget.dart
Last active April 17, 2020 14:03
Flutter - Lightsnap's full screen camera code
final size = MediaQuery.of(context).size;
final deviceRatio = size.width / size.height;
final xScale = cameraController.value.aspectRatio / deviceRatio;
// Modify the yScale if you are in Landscape
final yScale = 1;
return Container(
child: AspectRatio(
aspectRatio: deviceRatio,
@ro0t
ro0t / debian-graphicsmagick.sh
Created December 30, 2019 09:26 — forked from identityclash/debian-graphicsmagick.sh
install graphicsmagick on debian with png, jpeg, tiff, and webp support
apt-get install make git g++ gcc zlib1g zlib1g-dev libxml2 libxml2-dev -y
# https://developers.google.com/speed/webp/docs/compiling#building
cd /usr/local/src
wget http://downloads.webmproject.org/releases/webp/libwebp-0.4.3.tar.gz
tar -xvzf libwebp-0.4.3.tar.gz
cd libwebp-0.4.3
./configure
import { useState } from 'react';
const [missions, setMissions] = useState([{ task: 'Create another task!', done: false }]);
/**
* Add mission to the missions state and modify the first one to be done.
*/
const inputChanged = ev => {
if (ev.key === 'Enter' && ev.target.value.length > 0) {
const value = ev.target.value;