Skip to content

Instantly share code, notes, and snippets.

View minskmaz's full-sized avatar

minskmaz

  • San Francisco
View GitHub Profile
@minskmaz
minskmaz / Dockerfile
Created August 8, 2023 03:04 — forked from studiokeywi/Dockerfile
flygun
FROM node:latest
WORKDIR /app
COPY ./index.js ./
COPY ./package*.json ./
RUN npm ci
EXPOSE 8080
CMD ["npm", "start"]
module.exports = function(pwd, extra) {
var forge = require("node-forge");
forge.options.usePureJavaScript = true;
var EC = require('elliptic').ec;
return new Promise((resolve, reject) => {
var ec_p256 = new EC('p256');
if (!pwd)
@minskmaz
minskmaz / 0_reuse_code.js
Last active August 29, 2015 14:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@minskmaz
minskmaz / audiosprite.js
Created May 11, 2012 05:51 — forked from remy/audiosprite.js
An example of how an audio sprite can be used (includes fixes for iOS)
function Track(src, spriteLength, audioLead) {
var track = this,
audio = document.createElement('audio');
audio.src = src;
audio.autobuffer = true;
audio.load();
audio.muted = true; // makes no difference on iOS :(
/* This is the magic. Since we can't preload, and loading requires a user's
input. So we bind a touch event to the body, and fingers crossed, the