Skip to content

Instantly share code, notes, and snippets.

View ShanikaNishadhi's full-sized avatar

Shanika Wickramasinghe ShanikaNishadhi

View GitHub Profile
<!-- Import A-Frame and AR.js libraries -->
<script src="https://cdn.jsdelivr.net/gh/aframevr/aframe@1c2407b26c61958baa93967b5412487cd94b290b/dist/aframe-master.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script>
<!-- Loading Screen Styles -->
<style>
.arjs-loader {
height: 100%;
width: 100%;
position: absolute;
import redis
import sys
import requests
from datetime import timedelta
import json
# Create connectivity to the Redis server
def redis_connect():
try:
client = redis.Redis(host="localhost",port=6379,db=0,socket_timeout=5,)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./public/main.css">
<title>TailwindCSS Test</title>
</head>
<body>
<div class="h-screen">
module.exports = {
content: ["./src/**/*.{html,js}"],
theme: {
extend: {},
},
plugins: [],
}
# Delete Data
query_result = client.query(
faunaquery.delete(
faunaquery.ref(
faunaquery.collection("testCollection"), "328031285277622849")
)
)
# Update Data
query_result = client.query(
faunaquery.update(
faunaquery.ref(
faunaquery.collection("testCollection"), "328031285277622849"),
{ "data": {"name" : "Barry Allen", "email": "barry@gmail.com"}}
)
)
# Retrieve Data
query_result = client.query(
faunaquery.get(
faunaquery.ref(
faunaquery.collection("testCollection"), "328031285277622849")
)
)
# Insert Data into the Collection using a Map
query_result = client.query(
faunaquery.map_(
lambda username: faunaquery.create(
faunaquery.collection("testCollection"),
{"data": {"name": username}}
),
[
"Barry",
"Sam",
import os
from dotenv import load_dotenv
from urllib.parse import urlparse
from faunadb import query as faunaquery
from faunadb.client import FaunaClient
try:
# Load environment variable from .env file
load_dotenv()
secret = os.getenv("DB_ACCESS_KEY")
import styled from "vue-styled-components";
const buttonProps = {
color: String
};
const CButton = styled("button", buttonProps)`
color: ${props => props.color};
`;
export default CButton;