Skip to content

Instantly share code, notes, and snippets.

View ashishbeck's full-sized avatar
🚀
🚀🚀🚀

Ashish Beck ashishbeck

🚀
🚀🚀🚀
View GitHub Profile
@ashishbeck
ashishbeck / main.dart
Created August 2, 2023 10:08
Flutter layout
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Layout Builder Example')),
@ashishbeck
ashishbeck / randomRangedNumbers.dart
Last active November 2, 2022 12:46
Get random numbers between range (for personal chores)
import 'dart:math';
void main() {
final total = 30;
final max = 100;
final from = 0;
List<int> items = [];
@ashishbeck
ashishbeck / index.js
Last active April 22, 2022 10:41
Firebase Cloud Function to keep the community scores updated for my slide puzzle project at https://github.com/ashishbeck/slide_puzzle
const functions = require("firebase-functions");
const admin = require("firebase-admin");
admin.initializeApp();
const db = admin.firestore();
const FieldValue = admin.firestore.FieldValue;
exports.updateScores = functions.firestore
.document("users/{userId}")
.onUpdate((change, context) => {
const newValue = change.after.data();
@ashishbeck
ashishbeck / currency_symbols.json
Created August 16, 2020 07:10
Currency symbols manually entered from Wikipedia's list of symbols and Google searching (could be inaccurate, please correct if possible). The list of currency is extracted from https://openexchangerates.org/api/currencies.json as of 15th August 2020.
{
"AED": "د.إ",
"AFN": "؋",
"ALL": "L",
"AMD": "֏",
"ANG": "ƒ",
"AOA": "Kz",
"ARS": "$",
"AUD": "A$",
"AWG": "ƒ",