Skip to content

Instantly share code, notes, and snippets.

@frankyonnetti
frankyonnetti / Drupal8--loop-entity-reference-fields.php.twig
Last active February 16, 2021 18:01
Drupal 8 - loop entity reference fields #drupal #d8 #loop
Twig coding standards
https://www.drupal.org/node/1823416
Filters - Modifying Variables In Twig Templates
https://www.drupal.org/node/2357633
{% for i, value in content.field_app_prod_toggle_products %}
{% if node.field_app_prod_toggle_products[i].entity %}
{% if i == 0 %}
@bigsnarfdude
bigsnarfdude / gist:b6ae4dbd1b9b60d40cba
Created January 7, 2016 17:23
incident report template
Example infrastructure outage incident report
Friday, May 13, 2077
By the Example Security Team
Earlier this week we experienced an outage in our API infrastructure. Today we’re providing an incident report that details the nature of the outage and our response.
The following is the incident report for the Example Security outage that occurred on April 30, 2077. We understand this service issue has impacted our valued developers and users, and we apologize to everyone who was affected.

Development Contract Killer

A fork of the popular open-source contract for web designers and developers by Stuff & Nonsense, reworded for developers


Between us [company name] and you [customer name]

@davatron5000
davatron5000 / Sublime Text Setup.md
Last active April 15, 2023 15:39
A new user's guide to SublimeText 2. Estimated reading time: 2 mins. Estimated workthrough time: 12 minutes.

Make it useful

  • Install Package Control. For SublimeText 2, paste the following in Terminal:
import urllib2,os; pf='Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler( ))); open( os.path.join( ipp, pf), 'wb' ).write( urllib2.urlopen( 'http://sublime.wbond.net/' +pf.replace( ' ','%20' )).read()); print( 'Please restart Sublime Text to finish installation')

From here on out, use Package Control to install everything. +Shift+P, then type Install to get a list of installable packages you can 'livesearch through. After installing plugins, they should be running.

@JohnAlbin
JohnAlbin / _init.scss
Last active May 17, 2024 04:32
Handing IE8 and lower with Breakpoint + compass/support
// Initialize the Sass variables and partials used in this project.
// Set the legacy IE support variables. We override the default values set by
// the compass/support partial, but let styles-ie8.scss override these values.
$legacy-support-for-ie6 : false !default;
$legacy-support-for-ie7 : false !default; // Note the use of !default.
$legacy-support-for-ie8 : false !default;
// Partials to be shared with all .scss files.
@anatomatic
anatomatic / nvALT-idle-quit
Last active April 8, 2020 00:14
Applescript to quit nvALT when idle
-- adapted from: https://culturedcode.com/forums/read.php?7,30174,30597
(*
save as 'stay open' Application and launch at startup
to run in background, change info.plist file to include
<key>LSBackgroundOnly</key>
<true/>
*)
@NickTomlin
NickTomlin / st2-setup.md
Last active December 16, 2015 21:08
Quick notes on my ST2 Setup.

I use sublime text 2 (with vintage mode) to do front-end centric Drupal development, and some Python and Node.js on the side. This works in conjunction with my Dotfiles to make me a better, happier dev.

I love ST2 and use it everyday, but there are still tons of great plugins that I don't know about. Feel free to comment with any suggestions.

Happy Hacking!

-Nick

Using sublime from the command line

@robjwells
robjwells / Open in Chrome.applescript
Last active March 24, 2020 02:32 — forked from prenagha/Open In Chrome.scpt
Open current Safari URL in Chrome
-- Open current Safari URL in Chrome
--
-- Forked from https://gist.github.com/3153606
-- which was forked in turn from https://gist.github.com/3151932
tell application "System Events"
-- Check if Chrome is running
set chromeRunning to ((name of processes) contains "Google Chrome")
end tell
@etrepat
etrepat / FIle.sublime-settings.json
Created October 15, 2011 18:44
Sublime Text 2 - My Settings
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overriden in the platform
// specific settings file, for example, "Base File (Linux).sublime-settings".
// Because of this, setting them here will have no effect: you must set them
// in your User File Preferences.
"font_face": "Monaco",
"font_size": 12,