Skip to content

Instantly share code, notes, and snippets.

View tailorvj's full-sized avatar
💭
Playing around with Next.js

Tailor VJ tailorvj

💭
Playing around with Next.js
View GitHub Profile
@tailorvj
tailorvj / Firebase database rules #1
Created February 8, 2019 12:56
Firebase database rules set that allows logged in users only to read and write their own user into the users collection
{
"rules": {
"users" {
"$uid": {
".read": "$uid === auth.uid",
".write": "$uid === auth.uid"
}
}
}
}
@tailorvj
tailorvj / fullpagedashboard-client-playlist.json
Created February 20, 2019 17:34
Initial playlist data model for fullpagedashboard-client
{
"schedules": [
{
"schedule_id": "833ADC6F-B47D-4398-9EE7-43525BEB15D8",
"schedule_settings" : [
{
"defaultUrl": "http://404.jodi.org/",
"defaultDuration": 1200000 ,
"name": "hourly rotating schedule"
}
@tailorvj
tailorvj / dotsession-example.json
Created February 20, 2019 23:33
cat ~/.fullpagedashboard-client/.session.json data from a real live session before data model change to playlists
{
"dashboards": {
"active": "slidespresentation",
"items": [
{
"id": "slidespresentation",
"display": "Slides Presentation",
"url": "https://docs.google.com/presentation/d/e/2PACX-1vQAvcs1q2d1ftuMtmOm1pV2cawiHbNS8jRY52a8vJX9FNIB_LxyX52oYlI6a5cB0esDIoC4EugRDp5E/pub?start=true&loop=true&delayms=3000"
},
{
@tailorvj
tailorvj / docker-compose.yml
Created July 30, 2019 16:41
Docker compose file for FullPageOS
version: '3.6'
services:
custompios:
image: guysoft/custompios:devel
container_name: mydistro_builder
tty: true
restart: always
privileged: true
volumes:
import firebase from 'firebase/app';
import 'firebase/firestore';
const firebaseConfig = firebase.initializeApp({
//create a Firestore database in your Firebase project and
//replace only the internal part of this object from your Firebase web settings
apiKey: "",
authDomain: "your.firebaseapp.com",
databaseURL: "https://your.firebaseio.com",
projectId: "yourprojectid",
@tailorvj
tailorvj / the-most-basic-void-main.dart
Last active April 15, 2020 10:08
The most basic Dart app in the world
void main(){
print("App started");
App(); //no need to use the new keyword in Dart
print("App finished");
}
class App{
App(){
print("Constructing a class.");
}
@tailorvj
tailorvj / dart_StringBuffer_example.dart
Last active April 7, 2020 06:25
Dart StringBuffer example
main() {
StringBuffer sb = new StringBuffer('initial_content');
print('sb.length is ${sb.length}');
print('${sb.toString()}\n');
sb.write("_Hello");
sb.writeAll(['_space', '_and', '_more']);
print('sb.length is ${sb.length}');
@tailorvj
tailorvj / dart_inferred_var_runtimeType.dart
Created March 25, 2020 11:26
Dart runtimeType inferred from value assigned to variable
main() {
var theNumber = 42;
const PI = 3.14159;
var theText = 'Hello World!';
var learningDart = true;
print('theNumber is type ${theNumber.runtimeType}');
print('PI is type ${PI.runtimeType}');
print('theText is type ${theText.runtimeType}');
print('learningDart is type ${learningDart.runtimeType}');
@tailorvj
tailorvj / dart_list_variable_type_example.dart
Last active March 26, 2020 19:24
Dart list variable type example
main() {
List list = [1,'two',3,'four'];
print('list.length is ${list.length}');
print('list: $list');
print('list index 1 value: ${list[1]}');
print('list index 0 value: ${list[0]}\n');
print('Adding 10 to the end of the list');
@tailorvj
tailorvj / dart_map_example.dart
Created March 25, 2020 12:37
Dart Map key value pair collection example
main() {
Map map = {
'key1': 'value1',
'key2': 'value2',
'key3': 'value3'
};
print('map.length is ${map.length}');
print('map: $map');
print('map[\'key1\'] is ${map['key1']}');