Skip to content

Instantly share code, notes, and snippets.

@hillct
hillct / Dockerfile
Last active July 31, 2023 20:06
Docker file for building/testing the bitsandbytes python library on Jetson family SOMs
FROM nvcr.io/nvidia/l4t-pytorch:r35.2.1-pth2.0-py3
RUN apt-get update && apt-get install -y --no-install-recommends python3-pip python-is-python3 libcudnn8 libopenblas-dev \
libopenmpi-dev cuda-cupti-11-4 git
RUN python -m pip install --upgrade pip pytest einops scipy
WORKDIR /app
COPY . .
RUN CUDA_VERSION=114 make cuda11x && python setup.py install
ENTRYPOINT ["/bin/bash"]
@hillct
hillct / ngrok-installation.md
Created December 19, 2020 23:59 — forked from wosephjeber/ngrok-installation.md
Installing ngrok on Mac

Installing ngrok on OSX

brew cask install ngrok

Using ngrok

The easiest way to use ngrok to tunnel into your localhost is if your local project is running on a specific port (e.g. not using named vhosts). You just run ngrok http [port number].

You can quickly boot up a local webserver using ruby. cd into the project's root directory and run ruby -run -e httpd . -p [port number].

@hillct
hillct / node.js PassThrough stream.md
Created January 28, 2020 22:13 — forked from bowin/node.js PassThrough stream.md
Node.js Stream PassThrough Usage
const {PassThrough} = require('stream')
const fs = require('fs')

const d = new PassThrough()  

fs.createReadStream('tt2.js').pipe(d)  // can be piped from reaable stream

d.pipe(process.stdout)                 // can pipe to writable stream 
d.on('data', console.log) // also like readable
@rem *** Disable Some Service ***
sc stop DiagTrack
sc stop diagnosticshub.standardcollector.service
sc stop dmwappushservice
sc stop WMPNetworkSvc
sc stop WSearch
sc config DiagTrack start= disabled
sc config diagnosticshub.standardcollector.service start= disabled
sc config dmwappushservice start= disabled
@hillct
hillct / create-wav-from-buffer.js
Created October 9, 2019 20:56 — forked from revolunet/create-wav-from-buffer.js
web audio + wav buffering
/*
Goal : instantly play any wav source without download the file and without <audio/>
Idea is to use the fetch streaming API and pass raw data to web audio
My use case is playng a wav file
following http://stackoverflow.com/questions/38589614/webaudio-streaming-with-fetch-domexception-unable-to-decode-audio-data/38593356#38593356
@hillct
hillct / post.md
Created February 18, 2019 18:05 — forked from chrisguttandin/post.md
What else can we do with the Web Audio API?

What else can we do with the Web Audio API?

Of course the Web Audio API is meant for synthesizing and processing audio data. It is tailored for that use case. But at least in our digital world audio data is just a series of numbers, which are typically somewhere between +1 and -1. So why can't we use the Web Audio API for general computations?

Almost a year ago I had the pleasure to give a talk at the Web Audio Conference in Atlanta. The conference featured a lot of great talks, which I really appreciated as an attendee. However, as a speaker it was tough to reduce my own talk until it was short enough to fit into the schedule. I had the feeling that I had to rush through my slides. Since then I planned to write down my findings in a more detailed way, but I never got around to it. Luckily I was asked to repeat my talk at our local Web Audio Meetup here in

@hillct
hillct / the_includes.html
Created August 14, 2018 21:32 — forked from linssen/the_includes.html
Extending the jQuery Sortable With Ajax & MYSQL
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js"></script><link rel='stylesheet' href='styles.css' type='text/css' media='all' />
@hillct
hillct / data.json
Created August 7, 2018 20:35
This is a temporary data sample. No point in keeping it around after today (I hope)
[
"Basic",
"Closure",
"Cobol",
"Delphi",
"Erlang",
"Fortran",
"Go",
"Groovy",
"Haskel",
@hillct
hillct / flash-app.js
Created March 30, 2018 17:13 — forked from brianmacarthur/flash-app.js
Flash messaging in Express 4: express-flash vs. custom middleware in ejs, handlebars, or jade
var express = require('express');
var cookieParser = require('cookie-parser');
var session = require('express-session');
var flash = require('express-flash');
var handlebars = require('express-handlebars')
var app = express();
var sessionStore = new session.MemoryStore;
// View Engines
'use strict';
exports.havePerm = function(req, res, next) {
console.log("We're inside the havePerm() function");
var self=this;
this.funcs=['createOwn','readOwn','updateOwn','deleteOwn','createAny','readAny','updateAny','DeleteAny'];
this.funcs.map(function(name){
console.log("Setting up Method: havePerm()."+name+"()");
this[name] = function(resource){
console.log("We're inside the havePerm()."+name+"() function");