Skip to content

Instantly share code, notes, and snippets.


taher nullhook

  • Los Angeles
View GitHub Profile
View matmult.mlir
mlir-opt matmult.mlir -convert-linalg-to-loops -lower-affine -convert-scf-to-cf -convert-linalg-to-llvm -convert-memref-to-llvm -convert-func-to-llvm -reconcile-unrealized-casts > out.mlir
mlir-cpu-runner out.mlir -O3 -e main -entry-point-result=void --shared-libs=libmlir_runner_utils.dylib
kmelve / Image.css
Created October 11, 2019 15:07
Lazyload Images from
View Image.css
.root {
display: block;
position: relative;
.lqip {
image-rendering: pixelated;
width: 100%;
opacity: 1;
transition: opacity 50ms 100ms ease-out;
pyrocto / overload.js
Last active January 24, 2023 08:16
A modest proposal for operator overloading in JavaScript
View overload.js
It is a melancholy object-oriented language to those who walk through
this great town or travel in the country, when they see the JavaScript
programs crowded with method calls begging for more succinct syntax.
I think it is agreed by all parties, that whoever could find out a
fair, cheap and easy method of making these operators sound and useful
members of the language, would deserve so well of the publick, as
to have his statue set up for a preserver of the nation. I do therefore
humbly offer to publick consideration a pure JS library I've written
for overloading operators, which permits computations like these:
View image.js
import React, { Component } from 'react';
import styled from 'styled-components';
const Figure = styled.figure`
height: 0;
margin: 0;
background-color: #efefef;
position: relative;
padding-bottom: ${props => props.ratio}%;
wakita / Makefile
Last active March 3, 2023 17:23
Metal compute shader example
View Makefile
SDK = xcrun -sdk macosx
all: compute.metallib compute
compute.metallib: Compute.metal
# Metal intermediate representation (.air)
$(SDK) metal -c -Wall -Wextra -std=osx-metal2.0 -o /tmp/Compute.air $^
# Metal library (.metallib)
$(SDK) metallib -o $@ /tmp/Compute.air
gubatron /
Last active May 27, 2023 14:26
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015;

Updated August 29, 2019.

Updated last on February 27, 2023

Include Paths

On the compilation phase, you will usually need to specify the different include paths so that the interfaces (.h, .hpp) which define structs, classes, constants, and functions can be found.