Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am coryf on github.
  • I am coryf (https://keybase.io/coryf) on keybase.
  • I have a public key whose fingerprint is 6C9E 35B5 473C 4A5C 02C5 FC71 02BA 3DF7 E946 03F8

To claim this, I am signing this object:

@coryf
coryf / .vimrc
Last active December 12, 2018 19:53
Vim ripgrep and fzy
" ripgrep
" https://github.com/BurntSushi/ripgrep
set grepprg=rg\ --vimgrep\ --no-heading
set grepformat^=%f:%l:%c:%m
command -nargs=+ -complete=file Rg silent! grep! <args> | copen | redraw!
nmap <silent> <leader>a :Rg "\b<C-R><C-W>\b"<CR>
" fzy - fuzzy find
" https://github.com/jhawthorn/fzy
function! FzyCommand(choice_command, vim_command)
import React from 'react'
import i18n from 'i18n-js'
import { sanitize } from 'dompurify'
import _ from 'lodash'
export const htmlTranslate = (scope, options) => {
if (!scope.endsWith('_html')) {
return i18n.t(scope, options)
}
@coryf
coryf / fizzbuzz-fp-iterator.js
Last active June 11, 2019 20:03
javascript fizzbuzz functional iterator
const fizzBuzz = {
[Symbol.iterator]: (() => {
const stop = 100
const iterate = function* (number = 1, count5 = 1, count7 = 1) {
if (number > stop) { return }
if (count5 == 5 && count7 == 7) {
yield 'fizzbuzz'
yield *iterate(number + 1, 1, 1)
@coryf
coryf / dev-dnsmasq.sh
Last active November 11, 2020 20:17
dev dnsmasq osx
#!/bin/sh
brew install dnsmasq
echo "address=/dev3d.org/127.0.0.1" >> /usr/local/etc/dnsmasq.conf
sudo brew services start dnsmasq
sudo mkdir -p /etc/resolver
sudo tee /etc/resolver/dev3d.org >/dev/null <<EOF
nameserver 127.0.0.1
EOF