Skip to content

Instantly share code, notes, and snippets.

View MunishMummadi's full-sized avatar
☁️
Focusing

Munish Mummadi MunishMummadi

☁️
Focusing
View GitHub Profile

How to work on a Web API

Part 1: Basic Setup of a Web API

  1. Read-up on the relevant spec.
  2. Add .webidl file(s) in this folder for each interface that you want to implement. If one already exists, you want to add the missing parts to it.
  3. For each interface, this will generate a trait named {interface_name}Methods, accessible via use crate::dom::bindings::codegen::Bindings::{interface_name}Binding.
  4. Use this trait by:
    • Adding a matching struct, using #[dom_struct]
  • Adding methods with todo! bodies.
@MunishMummadi
MunishMummadi / README-Template.md
Created December 28, 2024 04:22 — forked from DomPizzie/README-Template.md
A simple README.md template

Project Title

Simple overview of use/purpose.

Description

An in-depth paragraph about your project and overview of use.

Getting Started

import React, { useState } from 'react';
import { Search, Filter, X } from 'lucide-react';
const AccessibleFilterInterface = () => {
const [selectedFilters, setSelectedFilters] = useState([]);
const [isFilterMenuOpen, setIsFilterMenuOpen] = useState(false);
// Sample filter options
const filterOptions = [
{ id: 'size-s', category: 'size', label: 'Small' },

//Error is

munish@Zoro:~/servo$ ./mach build
No build type specified so assuming `--dev`.
warning: unused import: `std::mem`
 --> components/script/dom/baseaudiocontext.rs:8:5
  |
8 | use std::mem;
  |     ^^^^^^^^
  |
@MunishMummadi
MunishMummadi / error.py
Created February 29, 2024 03:06
python error handling and logging
import csv
import logging
# Configure logging
logging.basicConfig(filename='etl.log', level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s')
def extract_data(input_file):
try:
with open(input_file, 'r') as csv_file:
\documentclass[a4paper,10pt]{article}
\usepackage[left=1in, right=1in, top=1in, bottom=1in]{geometry}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{xcolor}
% Define custom colors
\definecolor{darkblue}{RGB}{26,13,171}
% Set up hyperlinks