Skip to content

Instantly share code, notes, and snippets.

View mponizil's full-sized avatar

Misha Ponizil mponizil

  • Monument
  • Oakland, CA
View GitHub Profile
@mponizil
mponizil / largest_objects.sh
Created December 9, 2012 22:52
Shows you the largest objects in your repo's pack file.
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output
[
{
"id": "1",
"from": "Sample User",
"address": "misha@joinmonument.com",
"time": "2021-10-07 15:35:14",
"message": "Duis cursus, diam at pretium aliquet, metus urna convallis erat, eget tincidunt dui augue eu tellus. Phasellus elit pede, malesuada vel, venenatis vel, faucibus id, libero. Donec consectetuer mauris id sapien. Cras",
"subject": "Monument Interview",
"tag": "inbox",
"read": false
import { useRef, useEffect } from 'react';
// Dispatch onClose callback when clicking outside a referenced element or hitting escape.
// Useful for dismissable dropdowns or overlays prompts.
export const useClosable = onClose => {
const ref = useRef();
const handleClick = e => {
if (!ref.current?.contains(e.target)) {
onClose(e);
}
FROM mhart/alpine-node:8 AS base
WORKDIR /usr/src
COPY . .
RUN apk add --no-cache git
RUN yarn
RUN yarn build
FROM mhart/alpine-node:base-8
WORKDIR /usr/src
COPY --from=base /usr/src/ ./
04202db561e95941d2b5092a0a9e4ed4838b59e195884b83bc3426950d3a9242aa81708a559565819d7500e61e874687a7ad1e033fb3f6bd196a0c3ff734265d42;bueller
Verifying my Blockstack ID is secured with the address 1BFJou4Z9pPywGBsjtPEkAtUQH4XkBSPhj https://explorer.blockstack.org/address/1BFJou4Z9pPywGBsjtPEkAtUQH4XkBSPhj

Keybase proof

I hereby claim:

  • I am mponizil on github.
  • I am mponizil (https://keybase.io/mponizil) on keybase.
  • I have a public key whose fingerprint is F758 4681 02F6 E249 7537 4BB8 30A1 89A0 2879 59B3

To claim this, I am signing this object:

@mponizil
mponizil / myip
Created January 28, 2014 19:10
copy internal ip
#!/usr/bin/env coffee
os = require 'os'
nis = os.networkInterfaces().en0
for ni in nis
if ni.family is 'IPv4'
address = ni.address
copy = require('child_process').spawn('pbcopy')
copy.stdin.write(address)
@mponizil
mponizil / useragent.js
Created January 28, 2014 17:59
ua sniffer
define(function () {
var UA = {
reset: function(navigator) {
return this._parse(navigator);
},
is: {},
set: function(browser, version, os) {
os = os || '';
@mponizil
mponizil / testcase.html
Last active January 3, 2016 15:29
webkit translate3d scrolling bug
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
@-webkit-keyframes spin{
from{
-webkit-transform:rotate(0deg);
}
to{