Skip to content

Instantly share code, notes, and snippets.

View sannminwin's full-sized avatar

Sann Min Win sannminwin

  • IBM - International Business Machine
  • Jackson Heights
View GitHub Profile
@sannminwin
sannminwin / Generate Custom SSH Key.md
Created January 20, 2022 13:52 — forked from pavankjadda/Generate Custom SSH Key.md
Generate SSH Key with custom name

Create new Private and Public key on Host machine (Ex.macOS)

$ssh-keygen -t rsa
# Enter location and file name like (/Users/pjadda/.ssh/minishift_rsa), do not use default files
#Passphrase is optional

Create .ssh folder in Guest OS even if it exists

$ssh docker@192.168.64.3 mkdir -p .ssh
@sannminwin
sannminwin / drupal_8_twig_cheatsheet.md
Created June 9, 2021 02:57 — forked from raphaellarrinaga/drupal_8_twig_cheatsheet.md
[Drupal 8 Twig cheatsheet] #tags: drupal8, twig, cheatsheet

Drupal 8 Twig cheatsheet

Getting Drupal 8 field values in Twig

Image path: {{ file_url(content.field_name['#items'].entity.uri.value) }}

Image title text: {{ node.field_name.title }}

Entity Reference path: {{ content.field_tags[0]['#url'] }}

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop