Skip to content

Instantly share code, notes, and snippets.

View devkinetic's full-sized avatar
🏠
Working from home

Ryan Hartman devkinetic

🏠
Working from home
View GitHub Profile
@audetcameron
audetcameron / readme.md
Last active January 7, 2021 20:50
Bash and zsh aliases and helpers Laravel / NPM etc

aslias for .bashrc and or .zshrc

npm

list npm packages local and global

alias ng="npm list -g --depth=0 2>/dev/null"
alias nl="npm list --depth=0 2>/dev/null"
@BBGuy
BBGuy / dc_emw.php
Last active November 16, 2022 14:08
Working with Drupal commerce entities using entity_metadata_wrapper. Just a bunch of exampled copied from the web or added by me. will keep adding over time. now more then just commerce entities
<?php
// Basics
// Get a value.
$value = $wrapper->field_x->value();
// If the field is a reference field you will get the field object
// To get the wrapper back use:
$wrapper_b = $wrapper->field_ref;
// To set a value.