Skip to content

Instantly share code, notes, and snippets.

View lohanidamodar's full-sized avatar
🔨
Building Appwrite

Damodar Lohani lohanidamodar

🔨
Building Appwrite
View GitHub Profile
@lohanidamodar
lohanidamodar / workflow.yml
Created November 10, 2023 06:28
Create new branch and PR for issue
name: Handle Issues
on:
issues:
types: [opened]
jobs:
create-branch-and-pr:
runs-on: ubuntu-latest
steps:
@lohanidamodar
lohanidamodar / V2-Style-advance.css
Last active March 20, 2024 08:20 — forked from mewforest/YouTube Chat CSS.css
Styles for YouTube streaming live-chat (tested in OBS)
@import url("https://fonts.googleapis.com/css?family=Candal");
@import url("https://fonts.googleapis.com/css?family=Changa One");
@import url("https://fonts.googleapis.com/css?family=Imprima");
/* Background colors*/
body {
overflow: hidden;
background-color: rgba(0,0,0,0);
}
/* Transparent background. */
@lohanidamodar
lohanidamodar / firestore_service.dart
Created February 19, 2020 02:30
Flutter firestore generic helper class
import 'package:cloud_firestore/cloud_firestore.dart';
class DatabaseService<T> {
final String collection;
final Firestore _db = Firestore.instance;
final T Function(String, Map<String,dynamic>) fromDS;
final Map<String,dynamic> Function(T) toMap;
DatabaseService(this.collection, {this.fromDS,this.toMap});
Future<T> getSingle(String id) async {
var snap = await _db.collection(collection).document(id).get();
if(!snap.exists) return null;
@lohanidamodar
lohanidamodar / main.dart
Created January 12, 2020 13:56
Main.dart for date and time pickers tutorial
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Device Calendar',
theme: ThemeData(
@lohanidamodar
lohanidamodar / main.dart
Last active December 29, 2019 12:51
Original Main.dart from new flutter project
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Device Calendar',
theme: ThemeData(
@lohanidamodar
lohanidamodar / docker-remove-untagged-images
Created August 27, 2018 13:48
remove untagged images from docker
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
@lohanidamodar
lohanidamodar / Countries.sql
Last active June 7, 2018 07:16
List of countries with iso code, Dial code, currency name, currency symbol and currency code
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: May 06, 2017 at 03:59 PM
-- Server version: 5.5.54-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@lohanidamodar
lohanidamodar / countries.sql
Created June 7, 2018 07:11 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@lohanidamodar
lohanidamodar / gist:4bdb1c8789f34e677e020ca85c15f333
Created June 7, 2018 07:07 — forked from voskobovich/gist:43f851859c23a8261514
The list of countries with currency (ISO code and symbol) format in SQL.
DROP TABLE currency;
-- Create table variable
CREATE TABLE currency (
country VARCHAR(100),
currency VARCHAR(100),
code VARCHAR(100),
symbol VARCHAR(100)
);
@lohanidamodar
lohanidamodar / Data.js
Last active December 13, 2017 16:03
Nepali Calendar #nepali-date
his.nepMap[2000] = [0, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31 ];
this.nepMap[2001] = [0, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30 ];
this.nepMap[2002] = [0, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30 ];
this.nepMap[2003] = [0, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31 ];
this.nepMap[2004] = [0, 30, 32, 31, 32, 31, 30, 30, 30, 29, 30, 29, 31 ];
this.nepMap[2005] = [0, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30 ];
this.nepMap[2006] = [0, 31, 31, 32, 32, 31, 30, 30, 29, 30, 29, 30, 30 ];
this.nepMap[2007] = [0, 31, 32, 31, 32, 31, 30, 30, 30, 29, 29, 30, 31 ];
this.nepMap[2008] = [0, 31, 31, 31, 32, 31, 31, 29, 30, 30, 29, 29, 31 ];
this.nepMap[2009] = [0, 31, 31, 32, 31, 31, 31, 30, 29, 30, 29, 30, 30 ];