Skip to content

Instantly share code, notes, and snippets.

View Ahmadre's full-sized avatar
🐦
fluttering

Rebar Ahmad Ahmadre

🐦
fluttering
  • App Logik GmbH
  • Krefeld - Germany
View GitHub Profile
@Ahmadre
Ahmadre / nginx.conf
Created February 7, 2021 00:37
Nginx default webserver config
server {
listen 80;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
@Ahmadre
Ahmadre / .dockerignore
Created February 7, 2021 00:39
Dockerignore for Flutter
build/
.vscode/
android/
ios/
.idea/
pubspec.lock
@Ahmadre
Ahmadre / entrypoint.sh
Created February 7, 2021 00:41
Entrypoint for Flutter
#!/bin/sh -eu
flutter build web --release --dart-define TITLE=${TITLE:-}
chmod -R 755 /usr/share/nginx/html
cp -r /app/build/web/* /usr/share/nginx/html
nginx -g "daemon off;"
@Ahmadre
Ahmadre / example.dart
Created February 7, 2021 00:49
Call environment variables
return Scaffold(
appBar: AppBar(
title: Text(const String.fromEnvironment('TITLE')),
),
body: Container(),
);
@Ahmadre
Ahmadre / AnimatedCopy
Created June 11, 2021 22:02
AnimatedCopy Icon with Rive
/// Copyright © Rebar Ahmad
/// 12. June 2021 - Germany
///
/// IMPORTANT: You've to install the rive package:
/// rive: 0.7.14
/// at first
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:rive/rive.dart';
@Ahmadre
Ahmadre / ScrollAndPinch.cs
Created October 13, 2021 02:02 — forked from ditzel/ScrollAndPinch.cs
Pinch and Scroll to Move and Zoom in Unity for Mobile Games
/*
Set this on an empty game object positioned at (0,0,0) and attach your active camera.
The script only runs on mobile devices or the remote app.
*/
using UnityEngine;
class ScrollAndPinch : MonoBehaviour
@Ahmadre
Ahmadre / Generics.dart
Last active July 5, 2022 10:59
Generic Types in Flutter
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
/// Main
void main() {
runApp(GenericTypesApp());
}
/// EOF Main