HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent
- Dword
DisableWindowsConsumerFeatures
set to1
In the beginning there was NPM, and for a time it was good. Packages went forth and multiplied. The New Gods proclaimed the great demon Dependency Management had been slain. But The Old Gods knew better, for they had seen much and knew that the demon can never be killed, only held at bay.
The Old Gods were ignored. In the folly of a young age grew an abundance of packages and with them grew the scourge of dependency. In the depths beneath the earth, in a place beyond memory, the great demon stirred.
The first sign something was wrong was non-deterministic package version mismatches. “This is fine!” The New Gods declared. “A temporary setback, nothing more! We can fix it.” And so they introduced shrinkwrap, a lamp to combat the growing darkness.
But it proved to be too little, too late, and dusk continued to fall. The New Gods suffered their first major defeat at the [Battle of Left-pad](https://www.theregister.co.uk/2016/03/23/npm_left_
This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.
Workshop Instructor:
- Lilly Ryan @attacus_au
This workshop is distributed under a CC BY-SA 4.0 license.
<?php | |
function render_menu_navigation($menu_name,$theme_alter = ''){ | |
//Set system menu mobile | |
$menu_tree = \Drupal::menuTree(); | |
// Build the typical default set of menu tree parameters. | |
$parameters = $menu_tree->getCurrentRouteMenuTreeParameters($menu_name); | |
// Load the tree based on this set of parameters. | |
$tree = $menu_tree->load($menu_name, $parameters); | |
// Transform the tree using the manipulators you want. | |
$manipulators = array( |
(function () { | |
var waiting = setInterval( function () { | |
var nodes = document.querySelectorAll('.inline-svg[class^="icon-"], .inline-svg[class*=" icon-"]'); | |
for ( var i = 0; i < nodes.length; i++ ) { | |
// Pull the background in (this should always be a background image) | |
var background = document.defaultView.getComputedStyle(nodes[i])['background-image']; | |
// Check to see if an element has a background - if so, background has loaded | |
if (background && background !== 'none') { | |
if ( waiting ) clearInterval( waiting ); |
// Using Omega theme copy this to preprocess-html.inc | |
$data = array( | |
'#tag' => 'meta', | |
'#attributes' => array( | |
'http-equiv' => "X-UA-Compatible", | |
'content' => "IE=edge,chrome=1", | |
) | |
); |
# output | |
> gh = Redcarpet::Render::GithubStyleTitles.new | |
> puts Redcarpet::Markdown.new(gh).render "test\n\n# test 1\n\n# test 2\n\n# test 1\n\n# test 1" | |
=> | |
<a name="test-1" class="anchor" href="#test-1"><span class="anchor-icon"></span></a><h1 id="test-1">test 1</h1> | |
<a name="test-2" class="anchor" href="#test-2"><span class="anchor-icon"></span></a><h1 id="test-2">test 2</h1> |
/** | |
* Implements hook_field_widget_form_alter(). | |
*/ | |
function MODULENAME_hook_field_widget_form_alter(&$element, &$form_state, $context) { | |
// Prevent replace tokens on field admin ui form. | |
if (!is_null($element['#entity'])) { | |
// Determine the $user. If entity has uid, try to load. If can't, use the | |
// global $user. | |
if (isset($element['#entity']->uid)) { |
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Programmer's Shift Keys</name> | |
<!-- | |
Author: Carwin Young (@carwin) | |
Last Updated: 2014.07.18 | |
v.1.1 | |
Programmer's Shift Keys |
#!/bin/bash | |
## v1.0.6 | |
## this script will gernerate css stats | |
### example output | |
# CSS STATS | |
# ---------- | |
# Floats: 132 |