Skip to content

Instantly share code, notes, and snippets.

View athiyadeviyani's full-sized avatar

Athiya Deviyani athiyadeviyani

View GitHub Profile
// access the root div in index.html
const app = document.getElementById('root');
// create a container as a div in the html
const container = document.createElement('div');
container.setAttribute('class', 'container');
// place the container on the website
app.appendChild(container);
* {
box-sizing: border-box
}
body,
html {
height: 100%;
}
.bg {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Dad Jokes Daily</title>
<link href="https://fonts.googleapis.com/css?family=Dosis:400,700" rel="stylesheet">
@athiyadeviyani
athiyadeviyani / DateOps.scpt
Last active July 23, 2018 08:01
an applescript that performs simple date calculations
-- Performs the following date calculations:
-- What is the date [input days] ago?
-- What is the date [input days] later?
-- How many days ago is the [input date]?
-- How many days until the [input date]?
repeat
-- main switchboard
display dialog "Welcome to DAYS COUNTER! Choose the calculation:" buttons {"The date x days ago/later", "How many days to/since", "Exit"}
set btn to button returned of result
@athiyadeviyani
athiyadeviyani / sendmail.scpt
Created July 19, 2018 09:52
Send an e-mail from MS Outlook without opening the app
-- Send a quick e-mail from your desktop without having to be distracted by all the other e-mails in your inbox!
-- by Athiya Deviyani
-- Recipient name
display dialog "Recipient name" default answer ""
set theName to text returned of result
-- Recipient e-mail address
display dialog "Recipient e-mail address" default answer "user@mail.com"
@athiyadeviyani
athiyadeviyani / magictrick.py
Created July 19, 2018 08:33
Magic Trick based on modulos
from tkinter import *
from tkinter import scrolledtext
from tkinter import messagebox
from tkinter.ttk import Progressbar
from tkinter import filedialog
from tkinter import Menu
window = Tk()
window.title("Magic Trick")
@athiyadeviyani
athiyadeviyani / bmiapp.py
Created July 19, 2018 08:28
Embarrassingly simple BMI calculator
from tkinter import *
from PIL import Image, ImageTk
window = Tk()
window.title("BMI Calculator")
window.geometry('720x1000')
lbl = Label(window, text = "Welcome to the BMI Calculator!", font = ("System", 20))
lbl.grid(column = 0, row = 0, columnspan = 2)
@athiyadeviyani
athiyadeviyani / tkinterlist.py
Created July 19, 2018 08:27
Python GUI cheatsheet
# BASIC TKINTER CHEATSHEET
# Build basic GUIs with Python
from tkinter import *
from tkinter import scrolledtext
from tkinter import messagebox
from tkinter.ttk import Progressbar
from tkinter import filedialog
from tkinter import Menu