Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View DorinMol's full-sized avatar
🙂

Dorin Claudiu Moldoveanu DorinMol

🙂
View GitHub Profile
@DorinMol
DorinMol / gist:f9438f63bfdf9f9f09e42c6e25af165c
Last active June 9, 2023 14:36
Git/Github - multiple accounts
1. Generate 2 or more gpg keys https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key
2. Those keys will be under ~/.ssh
3. Add them to the right accounts
4. Edit config file under ~/.ssh
cat ~/.ssh/config
Host personal
HostName github.com
User git
@DorinMol
DorinMol / docker_wordpress.md
Created July 1, 2021 20:22 — forked from bradtraversy/docker_wordpress.md
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@DorinMol
DorinMol / flatNestedObjectsByPropNameHelper.ts
Last active June 9, 2021 19:31
Flat nested objects by property [helper function]
// Helper to extract paths ( root.with.deeply.nested.structure ) and their value using the specified leaf
// --- Found a version on the internet and modified it for this purpose.
// Using typescript
const flattenNestedObjectsByProperty = (object, property: string): { [prop: string]: any } => {
const pathsWithValue = {};
const separator: string = '.';
Object.assign({}, ...function _flatten(child, path = ([] as string[])) {
return ([] as string[]).concat(...Object.keys(child).map(key => typeof child[key] === 'object'
? _flatten(child[key], path.concat([key]))
@DorinMol
DorinMol / webdev_online_resources.md
Created May 1, 2021 15:56 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@DorinMol
DorinMol / docker-help.md
Created May 1, 2021 15:55 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@DorinMol
DorinMol / pipenv_cheat_sheet.md
Created May 1, 2021 15:24 — forked from bradtraversy/pipenv_cheat_sheet.md
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell