Skip to content

Instantly share code, notes, and snippets.

View richardanaya's full-sized avatar

richardanaya2_2048b.Q6_K_M.gguf richardanaya

View GitHub Profile
#!/bin/bash
PIANOTEQ_EXEC="$HOME/piano/x86-64bit/Pianoteq 9"
# Usage check
if [ -z "$1" ]; then
echo "Usage: play_piano <filename.mid> [\"Preset Name\"] [output_filename]"
exit 1
fi
@richardanaya
richardanaya / gist:e07b00a07661469f98cde3f4f25bcebb
Created July 24, 2025 21:53
Installing llama.cpp on HP Zbook Ultra G1a on Bazzite Linux
git clone https://github.com/ggml-org/llama.cpp.git
sudo rpm-ostree install rcom-hip-devel gfortran hipblas-common-devel hipblas-devel rocblas-devel glslc curl-devel
cd llama.cpp
HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" cmake -S . -B build -DGGML_HIP=ON -DAMDGPU_TARGETS=gfx1030 -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release -- -j 16
pub fn image_from_resource(path:&str) -> ImageSurface{
let pb = Pixbuf::from_resource(path).unwrap();
let mut pixels = unsafe { pb.get_pixels().to_owned() };
let pslice = pixels.as_mut_slice();
ImageSurface::create_for_data(pslice,if pb.get_has_alpha() { Format::ARgb32 } else { Format::Rgb24 },pb.get_width(),pb.get_height(),pb.get_width()).unwrap()
}
@richardanaya
richardanaya / style.css
Last active July 26, 2020 15:58
GTK-rs set global CSS
extern crate gtk;
use crate::gtk::prelude::*;
use gtk::*;
fn main() {
if gtk::init().is_err() {
println!("Failed to initialize GTK.");
return;
}
#import <objc/Object.h>
#import <stdio.h>
@implementation HelloWorld:Object
-(void) hello
{
printf("Hello World");
}
@end
@richardanaya
richardanaya / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<link rel="import" href="../paper-ripple/paper-ripple.html">
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../yt-video/yt-search-video.html">
<polymer-element name="my-element">
<template>
@richardanaya
richardanaya / JavascriptPrototypicalObject.js
Created December 17, 2011 17:12
Javascript Prototypical Object
//This file is mean to help show how javascript classes are put together.
//Parent Class constructor
var A = function(foo) {
//member variable
this.foo = foo;
};
//member function
A.prototype.getSecret = function() {