Skip to content

Instantly share code, notes, and snippets.

View homotechsual's full-sized avatar

Mikey O'Toole homotechsual

View GitHub Profile
@homotechsual
homotechsual / generate-docusaurus-sidebar.js
Created August 31, 2022 18:15 — forked from marcojahn/generate-docusaurus-sidebar.js
Generate docusaurus sidebar from folder structure
//
// Generates a sidebar based on file structure and
// markdown frontmatter properties.
//
// ---
// title: My Cool Feature
// sidebar_label: Introduction
// ---
//
// sidebar_sort_order: the sort order of this page in the sidebar
@marcojahn
marcojahn / generate-docusaurus-sidebar.js
Created February 19, 2021 09:05 — forked from rudasn/generate-docusaurus-sidebar.js
Generate docusaurus sidebar from folder structure
//
// Generates a sidebar based on file structure and
// markdown frontmatter properties.
//
// ---
// title: My Cool Feature
// sidebar_label: Introduction
// ---
//
// sidebar_sort_order: the sort order of this page in the sidebar
@coolaj86
coolaj86 / MacOS-Icons.md
Last active June 30, 2024 17:32
MacOS Default Icons Locations

How to Find ANY Icon

  1. Open the application such that you see the icon on your screen.
  2. Open Activity Monitor
  3. Double click the name of the application (i.e. Finder or System Preferences)
  4. Select "Open Files and Ports"
  5. Copy the output to a file and then grep for .icns

Similarly you could run this command, but it may take several minutes to complete:

@xurizaemon
xurizaemon / support-request-civicrm-pm.md
Last active May 20, 2021 04:55
no email / private support

Hi _____,

Thanks for getting in touch, it’s nice to talk with CiviCRM developers around the world. I hope this effort brings good results for you!

I enjoy contributing to community support through public channels available - Github, CiviCRM chat, Stack Exchange and other similar avenues.

If I am providing support, I want to know it's available to the community. In contrast, to preserve focus I make a distinction between these public forums and direct personal communication. Essentially it’s this: my email (and other private comms) is for personal discussions, and paid work.

By asking a question in the CiviCRM community channel, you’ll be demonstrating an ability to participate in the wider CiviCRM community, and to ask for help when needed. Please try to use the existing community resources for these requests.

@mootari
mootari / cleanup_field_values.php
Last active August 29, 2015 14:18
Delete entity translation leftovers (field values in languages other than the node language that are not LANGUAGE_NONE).
<?php
function EXAMPLE_cleanup_field_values($node_type = null) {
$query = new EntityFieldQuery;
$query->entityCondition('entity_type', 'node');
if($node_type) {
$query->entityCondition('bundle', $node_type);
}
$results = $query->execute();
if(empty($results['node'])) {
return;
@mootari
mootari / paragraphs_disable_drag_add.php
Last active August 29, 2015 14:18
Example on how to prevent reordering of paragraphs field forms (and other forms) #drupal #form-api #tabledrag
<?php
/**
* Removes item sort/add/remove capabilities.
*
* When called on an element during hook_field_attach_form(), this function
* ensures that no item can be added, removed or reordered.
* Currently adjusted to paragraphs. The core MV widget may required different
* button keys.
*/
function EXAMPLE_lock_paragraphs_multiple_value_form(&$element) {