Skip to content

Instantly share code, notes, and snippets.

View frankyonnetti's full-sized avatar

Frank Yonnetti frankyonnetti

View GitHub Profile
@frankyonnetti
frankyonnetti / gen-d8-salt.sh
Created February 24, 2022 16:24 — forked from pfaocle/gen-d8-salt.sh
Generate Drupal 8 hash salt
drush eval "var_dump(Drupal\Component\Utility\Crypt::randomBytesBase64(55))"
@frankyonnetti
frankyonnetti / sass-variables-for-selectors.scss
Last active May 22, 2021 19:54 — forked from alexkingorg/sass-selectors.scss
Scss - use variables for selectors #scss
// Vars - note the quotes around comma separated selectors
$a-tags: 'a, a:active, a:hover, a:visited';
$a-tags-hover: 'a:active, a:hover';
// Usage
#{$a-tags} {
color: red;
font-size: 1em;
text-decoration: none;
}
@frankyonnetti
frankyonnetti / register-post-type.php
Last active February 16, 2021 18:00 — forked from justintadlock/register-post-type.php
WordPress - help file when registering post types #wordpress
<?php
# Register custom post types on the 'init' hook.
add_action( 'init', 'my_register_post_types' );
/**
* Registers post types needed by the plugin.
*
* @since 1.0.0
* @access public
@frankyonnetti
frankyonnetti / if-unable-to-unmount-drive-mac.md
Last active February 17, 2021 02:04 — forked from bzerangue/_verify-repair-permissions-disk.md
macOS - Utilities: Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine #terminal #osx

If unable to unmount drive on Mac

You can try booting from OS X recovery by holding CMD + R at the time of startup. Once booted from OS X recovery, select Terminal from the utilities and then at the unix prompt enter:

  • diskutil list
  • then press return and look for the disk identifier and enter the following command with the disk identifier:
  • sudo diskutil unmountDisk /dev/(enter here disk identifier name)
  • Press return and enter your admin password if prompted. This should unmount all volumes of the physical drive.
  • If still the above method didn't work, then the last option is to force the entire disk to unmount.
  • For that using the terminal application again, enter the following command:
@frankyonnetti
frankyonnetti / Sublime Shortcuts.md
Last active May 23, 2021 20:34 — forked from lucasfais/gist:1207002
Sublime - Keyboard Shortcuts #sublime

Sublime Text 2 - Useful Shortcuts (macOS)

General

  • ⌘T go to file
  • ⌘⌃P go to project
  • ⌘R go to methods
  • ⌃G go to line
  • ⌘KB toggle side bar