Skip to content

Instantly share code, notes, and snippets.

View norman784's full-sized avatar

Norman Paniagua norman784

  • Kiel, Germany
View GitHub Profile
@bellbind
bellbind / Shaders.metal
Last active October 26, 2021 16:02
[swift][osx] Metal programming with commandline (Xcode less)
//-*- mode: c++ -*-
// build:
// xcrun -sdk macosx metal -std=osx-metal1.1 Shaders.metal -o shaders.air
// xcrun -sdk macosx metal-ar rcs Shaders.metalar Shaders.air
// xcrun -sdk macosx metallib -o Shaders.metallib Shaders.metalar
#include <metal_stdlib>
kernel void square(const device float* input [[buffer(0)]],
device float* output [[buffer(1)]],
metal::uint id [[thread_position_in_grid]]) {
@akhedrane
akhedrane / Convert_FR.sql
Created April 26, 2012 14:29
This MySQL function can convert numbers to french words. usage: SELECT Convert_FR('56.23', 'Dinars','Centimes');
CREATE DEFINER = 'root'@'localhost' FUNCTION `Convert_FR`(chIFfre varchar(20), SM varchar(40),CM varchar(40))
RETURNS varchar(255) CHARSET utf8 COLLATE utf8_unicode_ci
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN
DECLARE ch_int Varchar(20);
DECLARE ch, ch_r Varchar(255);
DECLARE i, fin_I INT;