Skip to content

Instantly share code, notes, and snippets.

View carwin's full-sized avatar
🍔
cheeseburger

Carwin Young carwin

🍔
cheeseburger
  • Missouri
View GitHub Profile
@JohannesMP
JohannesMP / Windows10RegistryHacks.md
Last active September 13, 2022 03:40
A small collection of Registry hacks for Windows 10 installations

Note: for any folder not found, navigate as far as possible, then create as a new Key

Disable Downloads like Candy Crush, etc.

  • HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CloudContent
  • Dword DisableWindowsConsumerFeatures set to 1

Disable Lock screen, just show login form

The Story of NPM and Yarn

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_

@attacus
attacus / riot-matrix-workshop.md
Last active March 13, 2024 00:16
Create your own encrypted chat server with Riot and Matrix

This guide is unmaintained and was created for a specific workshop in 2017. It remains as a legacy reference. Use at your own risk.

Running your own encrypted chat service with Matrix and Riot

Workshop Instructor:

This workshop is distributed under a CC BY-SA 4.0 license.

What are we doing here?

@henrytran9x
henrytran9x / function.php
Created January 3, 2017 09:06
Render menu navigation menu Drupal 8
<?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(
@aradnom
aradnom / grunticon-svg-inliner.js
Last active August 29, 2015 14:03
Grunticon SVG inliner - automatically replace grunticon-produced SVG backgrounds with inline SVGs. Framework-agnostic.
(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 );
@tarnus
tarnus / preprocess-html.inc
Created July 17, 2013 15:06
preprocess-html hook to force IE out of compatibility mode
// 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",
)
);
@courtenay
courtenay / STDOUT
Last active December 16, 2015 15:19
add the "<a name" and span icon there as well, so you can style it with a cute little hoverable link
# 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>
@tarnus
tarnus / token_functionality_in_fields
Last active December 15, 2015 00:29
Drupal Hook to add token functionality to default values of fields
/**
* 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)) {
@carwin
carwin / private.xml
Last active July 27, 2017 15:06
Programmer's Shift Keys: Remapping parens, brackets and braces for to because nerd.
<?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
@webeau
webeau / Gemfile
Created October 14, 2012 12:48 — forked from dvessel/README.mdown
Sass+Compass, Guard, LiveReload
# ~/Gemfile
source "http://rubygems.org"
group :development do
gem 'compass' # Depends on Sass, will be installed automatically.
gem 'compass-960-plugin' # 960.gs
gem 'compass-validator' # So you can `compass validate`.
gem 'oily_png' # Faster Compass sprite generation.
gem 'css_parser' # Helps `compass stats` output statistics.