Skip to content

Instantly share code, notes, and snippets.

View 10thfloor's full-sized avatar
💫

Mackenzie 10thfloor

💫
View GitHub Profile
import * as fcl from "@onflow/fcl"
import { KeyManagementServiceClient } from "@google-cloud/kms"
import * as crypto from "crypto"
import { fromBER, Sequence, Integer } from "asn1js"
var crc32c = require("fast-crc32c")
/////////////////////////////////////////////////////////////////////////////////////////////////
// This gist shows a quick example of using a Google Cloud managed key to sign a Flow transaction
// This would be called in a pattern similar to the below:
//
@10thfloor
10thfloor / GridStream.js
Created November 10, 2017 03:30 — forked from derMani/GridStream.js
NodeJS MongoDB-GridFS Video range stream exampleLets your browser seek/jump wihin the video-playback.
var express = require('express');
var app = express();
var mongo = require('mongodb');
var MongoClient = require('mongodb').MongoClient;
var GridStore = mongo.GridStore;
var ObjectID = require('mongodb').ObjectID;
function StreamGridFile(req, res, GridFile) {
@10thfloor
10thfloor / npm-unfuck.sh
Created November 9, 2016 00:31 — forked from ShMcK/npm-unfuck.sh
Quick fix for npm dependency issues. Run "bash npm-unfuck.sh"
# NPM Unfuck
# Brought to you by:
# Mackenzie Kieran & Shawn McKay
# remove deps
rm -rf node_modules
npm cache clean
# lock dependencies
@10thfloor
10thfloor / watch.sh
Last active October 8, 2015 12:53 — forked from mikesmullin/watch.sh
#!/usr/bin/env bash
# script: watch
# author: Mike Smullin <mike@smullindesign.com>
# license: GPLv3
# description:
# watches the given path for changes
# and executes a given command when changes occur
# usage:
# watch <path> <cmd...>
#
@10thfloor
10thfloor / css_splitter.rake
Created July 12, 2012 18:30 — forked from ChristianPeters/css_splitter.rake
Split CSS files so that there are no more than a given number of selectors in one style sheet. This is a tool to cope with Internet Explorer's limitation of max. 4095 selectors per stylesheet.
require 'rake'
require 'css_splitter'
desc 'split css files'
namespace :css do
task :split do
infile = ENV['infile'] || raise("missing infile")
outdir = ENV['outdir'] || File.dirname(infile)
max_selectors = ENV['max_selectors'] || 4095