This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function THEME_css_alter(&$css) { | |
foreach ($css as $key => $value) { | |
if ($value['group'] != CSS_THEME) { | |
$exclude[$key] = FALSE; | |
} | |
} | |
$css = array_diff_key($css, $exclude); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In template.php: | |
function THEME_menu_local_tasks($variables) { | |
// Add contextual links js and css library | |
drupal_add_library('contextual', 'contextual-links'); | |
$output = ''; | |
if (!empty($variables['primary'])) { | |
$variables['primary']['#prefix'] = '<div class="contextual-links-wrapper"><ul class="contextual-links">'; | |
$variables['primary']['#suffix'] = '</ul></div>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Afghan|Afghan | |
Albanian|Albanian | |
Algerian|Algerian | |
American|American | |
Andorran|Andorran | |
Angolan|Angolan | |
Antiguans|Antiguans | |
Argentinean|Argentinean | |
Armenian|Armenian | |
Australian|Australian |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
public static class ListExtensions | |
{ | |
public static IEnumerable<List<TInput>> AllCombinations<TInput>(this IList<TInput> list) | |
=> list.AllCombinations(() => new List<TInput>(), (list, item) => list.Add(item)); | |
public static IEnumerable<TCombinationContainer> AllCombinations<TInput, TCombinationContainer>( | |
this IList<TInput> list, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Format check on pull request | |
on: pull_request | |
jobs: | |
dotnet-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Format code on PR" | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
jobs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public abstract class Entity | |
{ | |
public Guid Id { get; set; } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Linq; | |
using System.Security.Cryptography; | |
using System.Text; | |
public static class IdFactory | |
{ | |
public static string CreateId(IEnumerable<(string key, string value)> kvps) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using DiffPlex.DiffBuilder; | |
using DiffPlex.DiffBuilder.Model; | |
using FluentAssertions.Execution; | |
using FluentAssertions.Primitives; | |
using Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp; | |
namespace FluentAssertions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Represents a multi-cast <see cref="IAsyncEnumerable{T}"/> where | |
/// each reader can consume the <typeparamref name="T"/> items | |
/// at its own pace. | |
/// </summary> | |
/// <typeparam name="T">The item type produced by the enumerable.</typeparam> | |
public sealed class MulticastAsyncEnumerable<T> : IAsyncEnumerable<T> | |
{ | |
private readonly UnboundedChannelOptions channelOptions; | |
private readonly object activeChannelsLock = new object(); |
OlderNewer