Skip to content

Instantly share code, notes, and snippets.

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

Oscar Sánchez scodx

🏠
Working from home
View GitHub Profile
@scodx
scodx / drupal_8_twig_cheatsheet.md
Created May 31, 2020 23:58 — 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'] }}

@scodx
scodx / drupal_8_php_cheat.md
Created May 31, 2020 23:58 — forked from raphaellarrinaga/drupal_8_php_cheat.md
[Drupal 8 php/config cheatsheet] #tags: drupal8, php, config, cheatsheet

Drupal 8 PHP cheatsheet

Get current node id

$node = \Drupal::routeMatch()->getParameter('node');
if ($node instanceof \Drupal\node\NodeInterface) {
  $nid = $node->id();
}
@scodx
scodx / media-query.css
Created August 19, 2019 22:53 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@scodx
scodx / gist:4183396ff90fa07980685506f5bd6348
Created May 11, 2018 13:26 — forked from snipe/gist:14752d829bd3490a2d0a
CALL TO UNDEFINED METHOD ILLUMINATE\COOKIE\COOKIEJAR::GET() in Laravel 4.2
Upgrade Sentry to v 2.1.*
@scodx
scodx / my.cnf
Created November 10, 2017 06:49 — forked from fragje/my.cnf
Custom my.cnf for use with MAMP. Place this file in `/Application/MAMP/conf/` and restart MAMP
# Example MySQL config file for large systems.
#
# This is for a large system with memory = 512M where the system runs mainly
# MySQL.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
# http://dev.mysql.com/doc/mysql/en/option-files.html

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik