Skip to content

Instantly share code, notes, and snippets.

View bdaniel7's full-sized avatar

Daniel Blendea bdaniel7

  • Bucharest, Romania
View GitHub Profile
@mrange
mrange / README.md
Last active January 12, 2025 03:23
# F# Advent 2021 Dec 08 - Fast data pipelines with F#6

F# Advent 2021 Dec 08 - Fast data pipelines with F#6

Thanks to Sergey Tihon for running F# Weekly and F# Advent.

Thanks to manofstick for trying out the code and coming with invaluable feedback. Cistern.ValueLinq is very impressive.

TLDR; F#6 enables data pipelines with up to 15x less overhead than LINQ

There were many interesting improvements in F#6 but one in particular caught my eye, the attribute InlineIfLambda.

@umutyerebakmaz
umutyerebakmaz / alpinejs-tab-image.blade.php
Created September 2, 2021 13:45
Example of Tab Component made using AlpineJS only
<div x-data="{ openTab: 1 }" class="flex flex-col-reverse">
<div class="hidden mt-6 w-full max-w-2xl mx-auto sm:block lg:max-w-none">
<div class="grid grid-cols-4 gap-6" aria-orientation="horizontal" role="tablist">
@foreach ($product->productImages as $productImage)
<button x-on:click="{ openTab = {{ $loop->iteration }} }" id="tabs-1-tab-{{ $loop->iteration }}"
class="relative h-24 bg-white rounded-md flex items-center justify-center text-sm font-medium uppercase text-gray-900 cursor-pointer hover:bg-gray-50 focus:outline-none focus:ring focus:ring-offset-4 focus:ring-opacity-50"
aria-controls="tabs-1-panel-{{ $loop->iteration }}"
:tabindex="openTab === {{ $loop->iteration }} ? 0 : -1"
:aria-selected="openTab === {{ $loop->iteration }} ? 'true' : 'false'"
role="tab"
@kurt-mueller-osumc
kurt-mueller-osumc / ParsingCSVsWithFsharp.ipynb
Last active December 31, 2021 17:36
ParsingCSVsWithFsharp.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chadmuro
chadmuro / Calendar.js
Created June 12, 2021 05:32
Full Calendar
import FullCalendar from '@fullcalendar/react';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import interactionPlugin from '@fullcalendar/interaction';
const events = [
{
id: 1,
title: 'event 1',
start: '2021-06-14T10:00:00',
@ninjarobot
ninjarobot / farmer-global-app.fsx
Last active June 18, 2021 03:37
Farmer application with multiple resource groups and traffic manager
#r "nuget: Farmer, 1.6.0"
open Farmer
open Farmer.Builders
open Farmer.Builders.ContainerGroups
open Farmer.Builders.TrafficManager
open Farmer.TrafficManager
let msi = userAssignedIdentity {
name "my-app"
@mallibone
mallibone / BuildDirCleanup.fsx
Created June 10, 2021 17:24
.NET build output cleanup script
#time
open System.IO
open System.Globalization
let EnumerateDirectories path =
Directory.EnumerateDirectories(path) |> Seq.toList
let isObjOrBinFolder (folderName:string) =
folderName.EndsWith("obj", true, CultureInfo.InvariantCulture) || folderName.EndsWith("bin", true, CultureInfo.InvariantCulture)
@RickStrahl
RickStrahl / ColorConsole.cs
Last active September 2, 2024 14:49
Color Console - a simple class to add color to .NET Console commands more easily.
using System;
using System.Text;
using System.Text.RegularExpressions;
namespace MainColorConsole
{
class Program
{
static void Main(string[] args)
{
@jsiebens
jsiebens / docker-compose.yaml
Created May 13, 2020 06:20
Ghost + Traefik + Inlets PRO
version: '3.2'
services:
inlets:
image: inlets/inlets-pro:0.6.1
restart: always
command: [
"client",
"--connect", "${INLETS_REMOTE}",
@devonestes
devonestes / with_example.ex
Created February 8, 2020 16:55
Further refactoring of a with statement
# Step 1
def create_subscription(email, plan_id, payment_method_id) do
with %User{customer_id: nil, name: name} = user <-
Repo.get_by(User, email: email),
{:ok, %Stripe.Customer{id: customer_id}} <-
Stripe.Customer.create(%{
name: name,
email: email,
payment_method: payment_method_id,
@atomkirk
atomkirk / hungarian.ex
Last active January 8, 2023 20:25
Hungarian/Munkres algorithm in Elixir
defmodule Hungarian do
@moduledoc """
Written by Adam Kirk – Jan 18, 2020
Most helpful resources used:
https://www.youtube.com/watch?v=dQDZNHwuuOY
https://www.youtube.com/watch?v=cQ5MsiGaDY8
https://www.geeksforgeeks.org/hungarian-algorithm-assignment-problem-set-1-introduction/