Skip to content

Instantly share code, notes, and snippets.

View pulsejet's full-sized avatar

Varun Patil pulsejet

View GitHub Profile
@pulsejet
pulsejet / readme
Last active June 12, 2024 03:18
Fix virtualbox big.LITTLE performance problems (tested on Dell)
# first set the My Dell app to use Ultra Performance mode
# enable high performance power plan
powercfg /s SCHEME_MIN
# disable throttling for vbox
powercfg /powerthrottling disable /path "C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe"
powercfg /powerthrottling disable /path "C:\Program Files\Oracle\VirtualBox\VirtualBoxVM.exe"
powercfg /powerthrottling disable /path "C:\Program Files\Oracle\VirtualBox\VirtualBox.exe"
powercfg /powerthrottling list
@pulsejet
pulsejet / build-alpine-toolchains.sh
Last active June 11, 2024 17:46
Script to create Docker image with Alpine / MUSL toolchains
#!/bin/bash
# This script creates multiple musl toolchains for LLVM.
# These can be used directly to produce static Linux binaries.
# Pass the alpine version as a command line parameter
# (see https://alpinelinux.org/downloads/)
#
# Usage: bash build-alpine-toolchains.sh v3.20
#
# For example, to compile for x86_64
# https://huggingface.co/google/siglip-base-patch16-256-multilingual
# install huggingface/transformers from source
# install optimum from this branch: https://github.com/huggingface/optimum/tree/xenova-add-siglip
# install onnx onnxruntime etc.
# Use T5 tokenizer fast and save_pretrained to get tokenizers.json
# https://github.com/huggingface/transformers/blob/main/src/transformers/models/t5/tokenization_t5_fast.py
# clone xenova/transformers.js and use the script to convert model
@pulsejet
pulsejet / tags.sql
Created March 13, 2024 02:04
Memories tags SQL query
WITH RECURSIVE oc_cte_folders_all(fileid, name, hidden) AS (
SELECT
f.fileid,
f.name,
(0) AS hidden
FROM
oc_filecache f
WHERE
(
f.fileid IN ('56')
@pulsejet
pulsejet / testbed-diagnostic.ts
Last active March 1, 2024 06:14
NDN-Play testbed diagnostic
/**
* Testbed diagnostic script for NDN play.
* http://play.ndn.today/?testbed=1&script=https://gist.githubusercontent.com/pulsejet/15278a61b47df6066346d36f9071065a/raw/testbed-diagnostic.ts
* It will use FCH to connect to the nearest testbed node and ping all nodes.
* A table will be printed to the JS console with ping times.
*/
import { connectToNetwork } from "@ndn/autoconfig";
import { Endpoint } from "@ndn/endpoint";
import { Forwarder } from "@ndn/fw";
@pulsejet
pulsejet / consumer.cpp
Last active January 26, 2023 04:10
ndn-cxx example
#include <ndn-cxx/face.hpp>
#include <iostream>
void
onData(const ndn::Interest&, const ndn::Data& data)
{
std::cout << "Received Data: " << data << std::endl;
}
void
@pulsejet
pulsejet / qsv-docker.sh
Last active September 28, 2023 00:58
Install QSV in debian docker
#!/bin/bash
sudo apt-get update
sudo apt-get remove -y libva ffmpeg
sudo apt-get install -y \
autoconf libtool libdrm-dev xorg xorg-dev openbox \
libx11-dev libgl1-mesa-glx libgl1-mesa-dev \
xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev \
libxkbcommon-x11-dev libxcb-dri3-dev \
vim cmake git nasm build-essential
@pulsejet
pulsejet / demo.cpp
Created September 19, 2022 01:43
SVS example for MiniNDN
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2012-2022 University of California, Los Angeles
*
* This file is part of ndn-svs, synchronization library for distributed realtime
* applications for NDN.
*
* ndn-svs library is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation, in version 2.1 of the License.
@pulsejet
pulsejet / gist:d82b205d9bfed2b65dc86c704347f5ff
Last active May 9, 2022 19:51
YaNFD profiling content store
See comments
Testing with ndncatchunks and ndnputchunks, 1gb file. With content store is very slow (few mbps), without content store is ~2gbps.
@pulsejet
pulsejet / scenario.conf
Created September 9, 2021 16:05
DCT test scenario
[nodes]
Texas: _ network=/world router=/Texas.Router/
California: _ network=/world router=/California.Router/
s1: _ network=/world router=/s1.Router/
s2: _ network=/world router=/s2.Router/
bob: _ network=/world router=/bob.Router/
alice: _ network=/world router=/alice.Router/
[links]
alice:bob delay=10ms
alice:s1 delay=10ms