Skip to content

Instantly share code, notes, and snippets.

View djirdehh's full-sized avatar
🏃‍♂️
runnin through the six

Hassan Djirdeh djirdehh

🏃‍♂️
runnin through the six
View GitHub Profile
@djirdehh
djirdehh / keybase.md
Created June 17, 2017 23:07
Keybase Declaration

Keybase proof

I hereby claim:

  • I am djirdehh on github.
  • I am djirdehh (https://keybase.io/djirdehh) on keybase.
  • I have a public key whose fingerprint is DDDB C924 ED57 A0F4 4138 28F4 8507 B686 DC14 B0A9

To claim this, I am signing this object:

const http = require("http");
const express = require('express');
const app = express();
app.use('/public', express.static('./public'));
app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html');
})
import React from 'react';
import ReactDOM from 'react-dom';
import App from './components/App';
ReactDOM.render(
<div>
<App />
</div>,
document.getElementById('root')
);
@djirdehh
djirdehh / NumberComponent.vue
Created June 14, 2018 03:28
NumberComponent - simple single-file component
<template>
<div>
<h2>The numbers are {{ numbers }}!</h2>
</div>
</template>
<script>
export default {
name: 'NumberComponent',
data () {
@djirdehh
djirdehh / Parent+Child_Components.vue
Last active April 21, 2022 18:05
Example of passing props in Vue
<!-- Parent Component -->
<template>
<div>
<ChildComponent :numbers="numbers" />
</div>
</template>
<script>
import ChildComponent from './child-component.js';
export default {
name: 'ParentComponent',
@djirdehh
djirdehh / CustomEvents.vue
Last active June 15, 2018 01:19
Example of using custom events in Vue
<!-- Parent Component -->
<template>
<div>
<ChildComponent
:numbers="numbers"
@number-added="numbers.push($event)"
/>
</div>
</template>
@djirdehh
djirdehh / event-bus.js
Last active June 14, 2018 03:37
Creating an EventBus instance
import Vue from 'vue';
export const EventBus = new Vue();
@djirdehh
djirdehh / App.spec.js
Created September 11, 2019 16:06
Full solution for 06 - Testing - Full Day of Vue.js Workshop
import { shallowMount } from "@vue/test-utils";
import App from "@/App.vue";
describe("App", () => {
let wrapper;
beforeEach(() => {
wrapper = shallowMount(App);
});
@djirdehh
djirdehh / listings.ts
Created November 4, 2019 02:10
Mock listings data used in lesson 1.9 of the TinyHouse Masterclass
export const listings = [
{
id: "001",
title:
"Clean and fully furnished apartment. 5 min away from CN Tower",
image:
"https://res.cloudinary.com/tiny-house/image/upload/v1560641352/mock/Toronto/toronto-listing-1_exv0tf.jpg",
address: "3210 Scotchmere Dr W, Toronto, ON, CA",
price: 10000,
numOfGuests: 2,
@djirdehh
djirdehh / .env
Created November 12, 2019 19:24
Sample .env file (without values) for Part I of the TinyHouse Fullstack React Masterclass.
PORT=
DB_USER=
DB_USER_PASSWORD=
DB_CLUSTER=