Skip to content

Instantly share code, notes, and snippets.

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
@CPT-GrayWolf
CPT-GrayWolf / aacsdb-update
Last active May 21, 2024 15:07
Install Blu-Ray AACS VUK keys for libaacs automatically from the FindVUK database.
#! /bin/bash
#
# This is a simple bash script, designed to allow
# quick download and installation of the FindVUK
# AACS VUK database.
#
# This allows Blu-Ray disks who's VUK is known
# to be played on systems using libaacs.
#
# It's reccomended to schedule this file to run
@milanboers
milanboers / deep_merge.py
Created November 12, 2020 12:56
Deep merge dicts in Python
def deep_merge(dict1: dict, dict2: dict) -> dict:
""" Merges two dicts. If keys are conflicting, dict2 is preferred. """
def _val(v1, v2):
if isinstance(v1, dict) and isinstance(v2, dict):
return deep_merge(v1, v2)
return v2 or v1
return {k: _val(dict1.get(k), dict2.get(k)) for k in dict1.keys() | dict2.keys()}
@dominikwilkowski
dominikwilkowski / README.md
Created September 5, 2020 02:57
ANSI codes for cli controled output

ANSI escape codes

ANSI escape codes can be printed to a shell to as instructions. The below is a list of codes I have used often in my CLI programs and I find myself looking up over and over again.

A great article about it can be found here.

Content

@NFantela
NFantela / final.component.ts
Last active May 21, 2024 15:02
Multiple inheritance in Typescript with mixins
@Component({
selector: 'my-app',
template : `
<h3>Class mixin demo</h3>
<mixin-demo value="New passed value" [isDisabled]="true"></mixin-demo>
`,
})
export class AppComponent {}
@halfelf
halfelf / how_to_build_a_fast_limit_order_book.md
Created February 11, 2019 02:18
How to Build a Fast Limit Order Book

https://web.archive.org/web/20110219163448/http://howtohft.wordpress.com/2011/02/15/how-to-build-a-fast-limit-order-book/

The response to my first few posts has been much larger than I’d imagined and I’d like to thank everyone for the encouragement.

If you’re interested in building a trading system I recommend first reading my previous post on general ideas to keep in mind.

My first really technical post will be on how to build a limit order book, probably the single most important component of a trading system. Because the data structure chosen to represent the limit order book will be the primary source of market information for trading models, it is important to make it both absolutely correct and extremely fast.

To give some idea of the data volumes, the Nasdaq TotalView ITCH feed, which is every event in every instrument traded on the Nasdaq, can have data rates of 20+ gigabytes/day with spikes of 3 megabytes/second or more. The individual messages average about 20 bytes each so this means handling

@eonist
eonist / My_favorite_ai_coding_prompts.md
Last active May 21, 2024 14:58
My_favorite_ai_coding_prompts.md

The art of prompt coding 🦾

Visitors

Apps used: Cursor.so / github copilot chat

img

⚠️️ Before you disregard the idea of prompt coding ⚠️️ Don't! Because everyone will be prompt-coding soon enough.

This is like when humanity stopped using horses for transportation and started using cars. 🐴 👉 🚗

@Brainiarc7
Brainiarc7 / ffmpeg-howto-localfiles-manipulation.md
Created July 25, 2016 13:43
This is a standard how-to for FFmpeg's usage with local files and streams. Small hand-book detailing common encode scenarios in a standard workflow.

Standard FFmpeg How-to

Table of Contents

* Generic Syntax

* Main Options

* Encoding :
@proppy
proppy / containers.yaml
Last active May 21, 2024 14:56
validate yaml file with gojsonschema
containers:
- image: "dockerfile/nginx"
ports:
- containerPort: 80
hostPort: 8080