Skip to content

Instantly share code, notes, and snippets.

Tom Hicks tomhicks

Block or report user

Report or block tomhicks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tomhicks
tomhicks / node-svm.cc
Created Feb 20, 2020
Node 12 node-svm fix
View node-svm.cc
#include "node-svm.h"
#include "training-worker.h"
#include "prediction-worker.h"
#include "probability-prediction-worker.h"
using v8::FunctionTemplate;
using v8::Object;
using v8::String;
using v8::Array;
@tomhicks
tomhicks / sweep-swoop.js
Last active Mar 21, 2020
Listen to your web pages
View sweep-swoop.js
const audioCtx = new window.AudioContext();
const oscillator = audioCtx.createOscillator();
oscillator.connect(audioCtx.destination);
oscillator.type = "sine";
let numItems = 0
oscillator.frequency.setValueAtTime(
1,
audioCtx.currentTime
@tomhicks
tomhicks / plink-plonk.js
Last active Apr 2, 2020
Listen to your web pages
View plink-plonk.js
View SpoingyScrollView.tsx
import * as React from "react"
import {captureScroll, getSpoingyTransform} from "spoingyHelpers"
import {Animated} from "react-native"
const headerHeight = 300
export default () => {
// use an instance variable if using component classes
const scrollY = React.useRef(new Animated.Value(0)).current
@tomhicks
tomhicks / spoingyHeaders.ts
Created Jun 20, 2019
Bouncy header helper functions
View spoingyHeaders.ts
import {Animated} from "react-native"
export function getSpoingyTransform(
scrollY: Animated.Value,
headerHeight: number,
) {
return [
{
translateY: scrollY.interpolate({
inputRange: [-headerHeight, 0, 1],
You can’t perform that action at this time.