Skip to content

Instantly share code, notes, and snippets.

@Pzixel
Pzixel / Dockerfile
Created April 29, 2024 17:46
Example rust dockerfile
# syntax=docker/dockerfile:1.6
FROM debian:bullseye-slim AS base
RUN apt-get update && apt install -y pkg-config libssl-dev openssl ca-certificates
FROM rustlang/rust:nightly-bullseye-slim@sha256:e2d04393a78619a97bc8c9d19da15685d3df61d09b5036b0e00759c40c938afe as build
RUN apt-get update && apt install -y pkg-config libssl-dev openssl ca-certificates
WORKDIR /usr/src/app
RUN <<EOF
@Pzixel
Pzixel / Fractionator.txt
Last active February 5, 2024 22:46
DSP
BLUEPRINT:0,21,2314,2014,0,0,0,0,638427770891251933,0.10.29.21904,Fractionator%20best,"H4sIAAAAAAAAC+19CXRVRRL2Tdj3LUhYBAQUFBQQCIRE8t59qLiCuw6oOCK4jaDoiCsIY1BBRUUEZAQVFRUVZY+CgBgQERBkFREQCJvsssP7q2717f7yUhnmP/85/3L+vHP65gu8SnVXV1VXd1f3TfI8L5NKKU8+/ahUMjjJi3veQvPPlby6xcy/d9ic59edtjHSqva4TMQ3/ZQd47Ki1LleKn0vTp8k/jP27wWPNX4Fr0s0aVjNtog3xyf7XJi4uEKczI9T8ZWWAHEZb4rPhYmTFOKg5vH4CkuAuCwRljXEyQpxcfmxzhIgrkiEFQ1xWYW4hLR5m3+uF4kkzak5DXHLpmNjXJi4mkJckh+fNK6XVtnzokyAeH/jO2JcmPhUUkHioEcnx+NZdb2NAbfaTbxI5xPxyNxRl+QMPli+w0ddyn29odQfSTuIZEvwB0LipACUFqEtBaE5fC21+VrT7opK1cuE7U7zxkWkrx0+XW5sjAsTV1KIy8qP9SBxh2eRkswyilJTIS4nPzb7NZhg4cS2iFtTlVubavsKcXn5scVW9aqkLX7qiW8Doe3aWqnDpU/e3Y6FtirJM1XPL7QK8ss2/2D820hSn57TEXcdnR3jwtxXKV3GgvROx3+2bUV8LlX7XFP1YkrVKyVWHfGRMoNjXJg4bj4eEFeWFuzxc2+pGv1h4g8ZiM/yWse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dBmveZdGcK5ExT9IycJlbT5gK5OWWaJVtcDcRqQ24hkFvorzhmnhbXAbHOkE8XyC31V7Vri8jiDmAoeCH5DoHcCm+14aMuFQ/HYSimsCmqAQK5tTIEcIZxTqEb6LdxBccnNpSevqGohqYefNn1zjLljhKAXGXsfAmoTXaeD7+70TF2rh6j7bwNGQv
using System;
using System.Collections.Generic;
using System.Linq;
namespace Extensions.Linq
{
public static class XEnumerable
{
public static IEnumerable<T> WhereNotNull<T>(this IEnumerable<T?> source) where T : class =>
source.Where(x => x is {})!;

I could do that in a weekend! | I'm trying some experimental tiers on Patreon to see if I can get to substack-like levels of financial support for this blog without moving to substack!

I can't think of a single large software company that doesn't regularly draw internet comments of the form “What do all the employees do? I could build their product myself.” Benjamin Pollack and Jeff Atwood called out people who do that with Stack Overflow. But Stack Overflow is relatively obviously lean, so the general response is something like “oh, sure maybe Stack Overflow is lean, but FooCorp must really be bloated”. And since most people have relatively little visibility into FooCorp, for any given value of FooCorp, that sounds like a plausible statement. After all, what product could possible require hundreds, or even thousands of engineers?

A few years ago, in the wake of the rapgenius SEO controversy, a number of folks called for someone to write a better Google. Alex Clemmer responded that maybe building a better G

if = {
limit = {
always = yes
}
set_variable = {
name = debug_value
value = var:tax_capacity_balance
}
#include <math.h>
#ifdef USE_RESTRICT
#else
#define __restrict
#endif
void transform (float * __restrict dest, float * __restrict src,
float * __restrict matrix, int n) __attribute__ ((noinline));
using System;
using System.Linq;
using System.Linq.Expressions;
using Microsoft.AspNet.OData;
using Microsoft.AspNet.OData.Builder;
using Microsoft.AspNet.OData.Extensions;
using Microsoft.AspNet.OData.Formatter;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Net.Http.Headers;
export const decodeArg = (web3: Web3, hexString: string, solidityType: string, offsetInBytes: number, lengthInBytes: number): any => {
if (lengthInBytes > 32) {
throw new Error('Cannot decode types >32 bytes length');
}
const zxoffset = hexString.startsWith('0x') ? 2 : 0;
const zeroedLength = 32 - lengthInBytes;
return web3.eth.abi.decodeParameter(solidityType, '00'.repeat(zeroedLength) + hexString.slice(zxoffset + offsetInBytes * 2, zxoffset + (offsetInBytes + lengthInBytes) * 2));
};
export const decodePackedArgs = (web3: Web3, hexString: string, typeMetadatas: [string, number][]) => {