Skip to content

Instantly share code, notes, and snippets.

View igitur's full-sized avatar

Francois Botha igitur

  • Cape Town, South Africa
View GitHub Profile
@ExcelRobot
ExcelRobot / ArrayManipulation.lambda
Last active January 19, 2024 05:56
Array Manipulation LAMBDA Functions
/*
Excel Array Manipulation LAMBDA functions
Courtesy of Excel Robot
The Microsoft Excel team recent released 11 new Excel functions for combining, shaping, and resizing arrays.
I had already created similar ones for myself using the amazing LAMBDA function. Since the new functions
are only available to users running Beta Channel, I've renamed my versions and given them the same function
names so anyone with LAMBDA and LAMBDA helper functions (like MAKEARRAY), and import these LAMBDAs into your
workbook and have nearly the same functionality.
@m-radzikowski
m-radzikowski / script-template.sh
Last active April 8, 2024 03:04
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
/// <summary>
/// Static helper class to debug failed MEF composition.
/// </summary>
public static class MefDebuggingHelper
{
/// <summary>
/// Writes missing import definitions to the debug console.
/// </summary>
/// <param name="container"></param>
[Conditional("DEBUG")]
@bradtraversy
bradtraversy / docker_wordpress.md
Last active April 10, 2024 08:56
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@timyhac
timyhac / GetLocalDBNamedPipe.ps1
Last active July 31, 2023 11:06
Get the pipe name for a Local DB instance in powershell
Function GetLocalDBNamedPipe()
{
param( [string]$DB)
# This function can accept instance names in the format '(localdb)\Instance'
$DB = $DB.replace("(localdb)\", '')
# Ensure that it is running (assumes the DB already exists)
# Note: pipe names change each time the database starts
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@angularsen
angularsen / MarginSetter.cs
Created January 17, 2015 12:19
WPF - Automatic horizontal or vertical spacing in StackPanel and other list like panels
using System.Windows;
using System.Windows.Controls;
using JetBrains.Annotations;
namespace Foo
{
public class MarginSetter
{
private static Thickness GetLastItemMargin(Panel obj)
{
@young-steveo
young-steveo / popper.js
Created January 16, 2014 20:47
Utility library that wraps bootbox.js and adapts it to use deferred objects
define(['jquery', 'bootbox'], function($, bootbox){
/**
* @author stephen.young@zumba.com
* @constructor
*/
var Popper = function(){};
/**
* Flat map of semantic interface methods to Deferred object methods.