Skip to content

Instantly share code, notes, and snippets.

@lylejantzi3rd
lylejantzi3rd / hn_seach.js
Last active August 6, 2017 23:36 — forked from meiamsome/hn_search.js
hn job query search
// takes arguments and produces an array of functions that accept context
function handle_args() {
var args = Array.prototype.slice.call(arguments);
return args.map(function(arg) {
if(arg instanceof Function) return arg; // Presumably already a contex-accepting function.
if(arg instanceof Array) return and.apply(this, arg); // make arrays behave as and.
// Presuming a string, build a function to check.
var my_regex = new RegExp(arg.toString(), 'i');
return function(context) {
return context.search(my_regex) > -1;
@lylejantzi3rd
lylejantzi3rd / ctrlTap.lua
Created July 11, 2018 01:27 — forked from kbussell/ctrlTap.lua
Send escape key if the ctrl key is tapped. (Used along side remapping my Caps Lock key to ctrl) Thanks to @asmagill 's examples for a starting point.
local alert = require("hs.alert")
local timer = require("hs.timer")
local eventtap = require("hs.eventtap")
local events = eventtap.event.types
local module = {}
-- timeout for ctrol key
module.timeFrame = .25
@lylejantzi3rd
lylejantzi3rd / shader.hlsl
Created June 17, 2021 10:44 — forked from mmozeiko/shader.hlsl
compute shader for rendering monospaced glyphs in grid
struct TermCell
{
uint GlyphIndex; // index into GlyphMapping buffer
uint Foreground;
uint Background;
};
cbuffer ConstBuffer : register(b0)
{
uint2 CellSize;
@lylejantzi3rd
lylejantzi3rd / ScopeStackDemo.cpp
Created October 27, 2022 09:34 — forked from jhaberstro/ScopeStackDemo.cpp
ScopeStack implementation stolen from Andreas Fredriksson's DICE presentation on Scope Stack Allocation.
// Simplified scope stack implementation
#include <new>
#include <cstdio>
#include <cassert>
typedef unsigned char u8;
class LinearAllocator {
public: