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
// ==UserScript==
// @name Override Instacart Ads Manager flippers
// @namespace https://ads.instacart.com/
// @version 0.6
// @updateURL https://gist.githubusercontent.com/jiang925/94b31524a7f38d32000c20797f1d53db/raw/override-flippers.user.js
// @downloadURL https://gist.githubusercontent.com/jiang925/94b31524a7f38d32000c20797f1d53db/raw/override-flippers.user.js
// @description Override Instacart Ads Manager flippers from UI. Note that this only affects pure UI flippers. This does not affects the flippers on the backend.
// @author Tian Jiang
// @include *://*.instacart.com/*
// @include *://*-web-ads-stg.instacart.team/*
@djirdehh
djirdehh / .env
Created January 1, 2020 02:08
Sample .env file (without values) for client project after lesson 12.1 of Part II of the TinyHouse Fullstack React Masterclass.
PORT=
PUBLIC_URL=
DB_USER=
DB_USER_PASSWORD=
DB_CLUSTER=
G_CLIENT_ID=
G_CLIENT_SECRET=
SECRET=
NODE_ENV=
G_GEOCODE_KEY=
@djirdehh
djirdehh / store.js
Last active January 23, 2021 23:41
import { createStore } from "vuex";
export default createStore({
state
mutations
actions
getters
});
import { createApp } from "vue";
import App from "./App.vue";
import store from "./store";
createApp(App).use(store).mount("#app");
import { reactive } from "vue";
export const store = {
state: reactive({
numbers: [1, 2, 3]
}),
addNumber(newNumber) {
this.state.numbers.push(newNumber);
}
};
<template>
<div>
<h2>{{ numbers }}</h2>
</div>
</template>
<script>
import { emitter } from "../event-bus.js";
export default {
name: "NumberDisplay",
<template>
<div>
<input v-model="number" type="number" />
<button @click="addNumber">Add new number</button>
</div>
</template>
<script>
import { emitter } from "../event-bus.js";
export default {
@djirdehh
djirdehh / event-bus.js
Created January 23, 2021 23:24
Event Bus Emitter
import mitt from "mitt";
export const emitter = mitt();
@djirdehh
djirdehh / users.ts
Created May 3, 2020 19:04
Seed data to populate users for the TinyHouse application as part of the Postgres + TypeORM lesson.
const users: User[] = [
{
id: "5d378db94e84753160e08b55",
token: "token_************",
name: "James J.",
avatar:
"https://res.cloudinary.com/tiny-house/image/upload/w_1000,ar_1:1,c_fill,g_auto/v1560648533/mock/users/user-profile-1_mawp12.jpg",
contact: "james@tinyhouse.com",
walletId: "acct_************",
income: 723796,
@djirdehh
djirdehh / listings.ts
Created May 3, 2020 19:03
Seed data to populate listings for the TinyHouse application as part of the Postgres + TypeORM lesson.
const listings: Listing[] = [
{
id: "5d378db94e84753160e08b30",
title: "Clean and fully furnished apartment. 5 min away from CN Tower",
description:
"2 bed, 2 bathroom cozy apartment in the heart of downtown Toronto and only 5 min away from the CN Tower, Scotiabank Arena, and Rogers Center.",
image:
"https://res.cloudinary.com/tiny-house/image/upload/v1560641352/mock/Toronto/toronto-listing-1_exv0tf.jpg",
host: "5d378db94e84753160e08b57",
type: ListingType.Apartment,