Skip to content

Instantly share code, notes, and snippets.

View HerbM's full-sized avatar

Herb Martin HerbM

  • LearnQuick.Com
  • Austin, TX
View GitHub Profile
@CarstenKoenig
CarstenKoenig / FormatCombinations.fsx
Last active June 4, 2017 09:55
Recursive Problem / Data
(*****************************************************************************************
* Task:
* =====
*
* There is a string which may contain asterisks. Each asterisk must be replaced by
* a 0 or 1 and then all possible output combinations must be printed out.
*
* For example the strings
*
* a*b must produce two outputs a0b and a1b
@aallan
aallan / mac-vendor.txt
Last active July 31, 2025 18:21
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
@cdhunt
cdhunt / map_fold.ps1
Created October 27, 2016 13:55
Map and Fold implementations in Powershell
function map([scriptblock]$map, [Collections.IEnumerable]$x, $y) { $x.ForEach({& $map $_ $y}) }
# Two parameters
map { param($x, $y) $x + $y } @(1,2,3) 10
# Anonymous function as a value
$squareIt = { param($x) $x + $x }
map $squareIt @(1,2,3)
# One parameter
@Jaykul
Jaykul / Format-Wide.ps1
Created February 24, 2016 05:30
A Format-Wide that can pivot the output and order it vertically
function Format-Wide {
[CmdletBinding(HelpUri='http://go.microsoft.com/fwlink/?LinkID=113304')]
param(
[Parameter(Position=0)]
[System.Object]
${Property},
[switch]
${AutoSize},
@MikeInnes
MikeInnes / startup.jl
Last active April 28, 2025 14:51
Some useful macros for Julia
# Repeat an operation n times, e.g.
# @dotimes 100 println("hi")
macro dotimes(n, body)
quote
for i = 1:$(esc(n))
$(esc(body))
end
end
end