Skip to content

Instantly share code, notes, and snippets.

View mponizil's full-sized avatar

Misha Ponizil mponizil

  • Monument
  • Oakland, CA
View GitHub Profile
[
{
"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 / query-string.js
Created September 14, 2015 19:50
parse/build querystring
function parseQuery(qs) {
return qs.replace('?', '').split('&').reduce(function(obj, pair) {
var i = pair.indexOf('=')
, key = pair.slice(0, i)
, val = pair.slice(++i);
obj[key] = decodeURIComponent(val);
return obj;
}, {});
}

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 101C A828 AA9D 9A78 5011 0FF3 9B91 349C A867 E084

To claim this, I am signing this object:

@mponizil
mponizil / jquery-placeholder.coffee
Created March 24, 2014 16:46
jquery-placeholder.coffee
define [
'jquery'
], ($) ->
$.support.placeholder = 'placeholder' of document.createElement('input')
placeholder =
listen: (container) ->
container.find('[placeholder]').each (i, el) ->
@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)