Skip to content

Instantly share code, notes, and snippets.

View Laeeth's full-sized avatar

Laeeth Isharc Laeeth

View GitHub Profile
@Laeeth
Laeeth / get_recursive.d
Created February 21, 2020 19:30 — forked from schveiguy/get_recursive.d
Another recursive range possibility, using simple linked-list stack.
import std.range;
struct StackFrame(T)
{
StackFrame* prev;
T range;
}
struct StackRange(T, alias recurse) if (isInputRange!(typeof(recurse(T.init))))
{
@Laeeth
Laeeth / Main.java
Created January 6, 2020 02:04
Opengamma JNI
//package io.kaleidic.main;
import com.opengamma.strata.basics.index.IborIndex;
import com.opengamma.strata.basics.index.IborIndices;
import com.opengamma.strata.product.fra.Fra;
import com.opengamma.strata.product.fra.FraTrade;
import com.opengamma.strata.product.TradeInfoBuilder;
import com.opengamma.strata.product.AttributeType;
class Main {
public native FraTrade foo(Fra.Builder builder);
@Laeeth
Laeeth / imap-search
Created December 23, 2019 01:56 — forked from martinrusev/imap-search
IMAP Search criteria
@Laeeth
Laeeth / cpp_vs_d.md
Last active December 17, 2019 10:50
C++ vs D

C++ using Mark Joshi's library

 LPXLFOPER EXCEL_EXPORT xlStats(LPXLFOPER inTargetRange) {
        EXCEL_BEGIN;
        XlfOper xlTargetRange(inTargetRange);

        // Temporary variables.
        double averageTmp = 0.0;
        double varianceTmp = 0.0;
@Laeeth
Laeeth / article.md
Created July 16, 2019 15:33 — forked from MIvanchev/article.md
Ever wondered what it takes to run Windows software on ARM? Then this article might be for you!
@Laeeth
Laeeth / dhcp_snooping.sh
Created June 3, 2019 14:28 — forked from ericpulvino/dhcp_snooping.sh
Quick Script to Emulate Basic DHCP Trusted Ports / DHCP Snooping / DHCP Filtration
#!/bin/bash
# Root Check
if [ $(whoami) != 'root' ]; then
echo "ERROR: Must be root to run $0"
exit 1;
fi
TRUSTED_PORTS=( swp1 swp3 )
#!/usr/bin/env bash
# Loads and mounts an ISO over SMB via the
# SuperMicro IPMI web interface
#
# usage: supermicro-mount-iso.sh <ipmi-host> <smb-host> <path>
# e.g.: supermicro-mount-iso.sh 10.0.0.1 10.0.0.2 '\foo\bar\windows.iso'
set -x
@Laeeth
Laeeth / libvirt.di
Created April 2, 2018 14:35
converted libvirt
import core.stdc.config;
import core.stdc.stdarg: va_list;
struct struct___locale_data { int dummy; }
typedef unsigned char __u_char;
typedef unsigned short int __u_short;
typedef unsigned int __u_int;
typedef unsigned long int __u_long;
@Laeeth
Laeeth / foo.cpp
Created February 22, 2018 17:28
extern(C) register passing bug
#include <stdio.h>
struct Foo
{
double a;
void *p;
};
extern "C" Foo foo2(Foo foo, double a, double b, double c)
{
@Laeeth
Laeeth / syncoid.d
Created October 3, 2017 10:03
Port of syncoid from perl to dlang
#!/usr/bin/rdmd
module kaleidic.apps.cli.syncoid;
import std.stdio;
import std.datetime;
import std.socket: hostName;
import std.getopt;
enum SanoidVersion = "1.4.16";