Skip to content

Instantly share code, notes, and snippets.

View gyenabubakar's full-sized avatar
:octocat:

Gyen Abubakar Sadick gyenabubakar

:octocat:
View GitHub Profile
@gyenabubakar
gyenabubakar / objects2array.js
Last active March 1, 2021 14:25
Given an object 'fakeObj'; loop though all the properties of 'fakeObj' object and add them into an array. If there's a nested object, it should be removed from its parent object and added to the array directly. So, basically, all objects should be detached and made stand-alone in the final array, regardless of their position in the given object …
// example object
const fakeObj = {
key1: {
prop1: true,
prop2: 34,
prop3: 'Hello',
prop4: [],
},
key2: {
prop1: true,
@gyenabubakar
gyenabubakar / my.gitconfig
Last active May 26, 2022 10:26
My Git Configuration
[core]
editor = \"C:\\Users\\WALLEL\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe\" --wait
autocrlf = true
[user]
name = Gyen Abubakar
email = <email>
[diff]
tool = p4merge
[difftool "VSCode"]
cmd = "code --wait --diff $LOCAL $REMOTE"
<script>
// since Child is wrapped inside VideoCallFunctionProvider,
// we can access the context value here
import { get } from '.VideoCallFunctionProvider.svelte';
const { triggerVideoCall } = get()
</script>
<button on:click={() => triggerVideoCall()}>
Call John Doe