Skip to content

Instantly share code, notes, and snippets.

View DreamEcho100's full-sized avatar

Mazen Mohamed Shaban Abdelkareem DreamEcho100

View GitHub Profile
@DreamEcho100
DreamEcho100 / .gitignore
Created February 19, 2023 18:22 — forked from FullStackForger/.gitignore
.gitignore for Unity3d project
###
# Unity folders and files
###
[Aa]ssets/AssetStoreTools*
[Bb]uild/
[Ll]ibrary/
[Ll]ocal[Cc]ache/
[Oo]bj/
[Tt]emp/
[Uu]nityGenerated/
@adrianhajdin
adrianhajdin / App.css
Last active April 23, 2024 08:01
Build and Deploy a React Admin Dashboard App With Theming, Tables, Charts, Calendar, Kanban and More
@import url('https://cdn.syncfusion.com/ej2/material.css');
.sidebar {
box-shadow: rgb(113 122 131 / 11%) 0px 7px 30px 0px;
}
.nav-item,
.navbar {
z-index: 10000;
}
@media screen and (max-width:800px) {
@adrianhajdin
adrianhajdin / StateContext.js
Last active April 9, 2024 15:49
Build and Deploy a Modern Full Stack ECommerce Application with Stripe
import React, { createContext, useContext, useState, useEffect } from 'react';
import { toast } from 'react-hot-toast';
const Context = createContext();
export const StateContext = ({ children }) => {
const getLocalStorage = (name) => {
if (typeof window !== 'undefined') {
const storage = localStorage.getItem(name);
@DreamEcho100
DreamEcho100 / ProfilePage Schema Example
Created September 11, 2021 06:11 — forked from warnakey/ProfilePage Schema Example
ProfilePage Schema Example in JSON-LD
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "ProfilePage",
"mainEntity" : {
"@type" : "Person",
"name" : "Jane Doe",
"givenName" : "Jane",
"familyName" : "Doe",
"email" : "jdoe@examplelaw.com",
@tiptopcoder
tiptopcoder / _error.tsx
Last active April 17, 2023 10:26
Next.js Typescript error page
import { NextPageContext } from "next";
const Error = ({ statusCode }) => {
return (
<p>
{statusCode
? `An error ${statusCode} occurred on server`
: "An error occurred on client"}
</p>
);
@warnakey
warnakey / ProfilePage Schema Example
Last active October 23, 2022 17:32
ProfilePage Schema Example in JSON-LD
<script type="application/ld+json">
{
"@context" : "http://schema.org",
"@type" : "ProfilePage",
"mainEntity" : {
"@type" : "Person",
"name" : "Jane Doe",
"givenName" : "Jane",
"familyName" : "Doe",
"email" : "jdoe@examplelaw.com",
@photonstorm
photonstorm / phaser3-example.html
Last active February 21, 2024 05:27
Phaser 3 Example
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/phaser@3.15.1/dist/phaser-arcade-physics.min.js"></script>
</head>
<body>
<script>
var config = {
type: Phaser.AUTO,
@rusllonrails
rusllonrails / POSTGRESQL JSONB BEST TUTORIALS
Last active October 10, 2021 04:52
POSTGRESQL JSONB BEST TUTORIALS
MIKE WANT US TO CARE ABOUT:
1) INDEXES
http://blog.2ndquadrant.com/jsonb-type-performance-postgresql-9-4/
2) TRY TO USE VIEW ON SIMPLE SEARCH
http://www.postgresql.org/docs/9.3/static/rules-materializedviews.html
GUIDES
1) http://schinckel.net/2014/05/25/querying-json-in-postgres/
@FullStackForger
FullStackForger / .gitignore
Last active April 6, 2024 13:19
.gitignore for Unity3d project
###
# Unity folders and files
###
[Aa]ssets/AssetStoreTools*
[Bb]uild/
[Ll]ibrary/
[Ll]ocal[Cc]ache/
[Oo]bj/
[Tt]emp/
[Uu]nityGenerated/
@rolandoam
rolandoam / no_oop_for_you_in_js.mdown
Created June 25, 2012 23:57
you should not use OOP (in javascript)

You should not use OOP (in javascript)

I've been coding javascript for some time now, including interacting with several javascript VMs.

Having said that, this is just a rant about what I think could be a good approach on how to actually do things in javascript. This after looking at how other projects are dealing with it, my personal experience and finally "getting" the way javascript was meant to be used (if there's such a thing). I do not consider myself an expert in javascript, so take whatever you read here with a grain of salt and think of it as just my personal experience and of course, I'll be happy to hear what you know or your best practices around it.

The real purpose for this post is to initiate a discussion about the subject of not really using OOP when dealing with javascript, and the good way to design and think about