This file contains hidden or 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
#!/bin/bash | |
# ./prune_branches.sh /path/to/your/repo | |
# Check if a repository directory parameter is provided | |
if [ $# -ne 1 ]; then | |
echo "Usage: $0 <repository_directory>" | |
exit 1 | |
fi |
This file contains hidden or 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
import pytest | |
from datetime import datetime | |
from typing import Callable, Any | |
from cloudevents.sdk.event import v1 as cloud_event | |
def handle_new_file_event(event: cloud_event.Event, storage_client: Callable[[Callable[[Any], None]], None], | |
checksum_calculator: Callable[[str], str], writer: Callable[[Any, str], None]) -> None: | |
file_path = event.data | |
try: |
This file contains hidden or 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
# Just bought my wife an artificial leg for Christmas. | |
# It’s not her main present just a stocking filler. | |
git clone git@github.com:Urban82/electron-google-meet.git | |
cd electron-google-meet/src/app/ | |
npm install --save-dev electron | |
npm start |
This file contains hidden or 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
# Hello, world! | |
cask 'vbox-6-0-16' do | |
version '6.0.16-135675-OSX' | |
sha256 '414a7b8ac37510b2a8db4c624718b1bef397d1374e5baf48417733464c7adc99' | |
url "https://download.virtualbox.org/virtualbox/6.0.16/VirtualBox-6.0.16-135675-OSX.dmg" | |
name 'Oracle VirtualBox' | |
homepage 'https://www.virtualbox.org/' | |
conflicts_with cask: 'virtualbox-beta' |
This file contains hidden or 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.Collections.ObjectModel; | |
using System.Globalization; | |
using System.Linq; | |
using System.Reflection; | |
using Nancy; | |
using Nancy.Bootstrapper; | |
using Nancy.Configuration; | |
using Nancy.Conventions; |
This file contains hidden or 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.Diagnostics; | |
using System.Linq; | |
using System.Reflection; | |
namespace left_fold_projector | |
{ | |
class Program | |
{ |
This file contains hidden or 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
byte[] destinationArray = Guid.NewGuid().ToByteArray(); | |
DateTime time = new DateTime(0x76c, 1, 1); | |
DateTime now = DateTime.Now; | |
TimeSpan span = new TimeSpan(now.Ticks - time.Ticks); | |
TimeSpan timeOfDay = now.TimeOfDay; | |
byte[] bytes = BitConverter.GetBytes(span.Days); | |
byte[] array = BitConverter.GetBytes((long) (timeOfDay.TotalMilliseconds / 3.333333)); | |
Array.Reverse(bytes); | |
Array.Reverse(array); | |
Array.Copy(bytes, bytes.Length - 2, destinationArray, destinationArray.Length - 6, 2); |
This file contains hidden or 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
public static class AssignableExtensions | |
{ | |
/// <summary> | |
/// Determines whether the <paramref name="genericType" /> is assignable from | |
/// <paramref name="givenType" /> taking into account generic definitions | |
/// </summary> | |
public static bool IsAssignableToGenericType(this Type givenType, Type genericType) | |
{ | |
if (givenType == null || genericType == null) | |
{ |
This file contains hidden or 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
internal class Employee | |
{ | |
public string NationalInsuranceNumber { get; set; } | |
} |
This file contains hidden or 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
public class DocumentFileNameExamplesAttribute : TestCaseSourceAttribute | |
{ | |
public DocumentFileNameExamplesAttribute() | |
: base(typeof(DocumentFileNameExamplesAttribute), "FileNameExamples") | |
{ | |
} | |
// ReSharper disable UnusedMethodReturnValue.Local | |
private static IEnumerable<TestCaseData> FileNameExamples | |
{ |
NewerOlder