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 / create-github-repo.md
Last active March 1, 2024 18:09
Create a GitHub Repository from a Local Directory on Linux or macOS

Prerequisites

  1. Must have Git installed.
  2. Must have GitHub CLI installed.

How to

  1. Create a file git-create-repo.sh in your home directory and save the content of git-create-repo.sh below in the file.
  2. Add a Git alias called create-repo that runs the script:
git config --global alias.create-repo "! ~/git-create-repo.sh"
<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
@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"
@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,