Skip to content

Instantly share code, notes, and snippets.

View iha2's full-sized avatar

Iheatu Wogu iha2

  • Founder@Recursive.House
  • Toronto
View GitHub Profile
@iha2
iha2 / .vimrc
Last active November 9, 2021 19:22
scripts
set nocompatible
set nowrap
set number
set showmode
set tw=80
set smartcase
set smarttab
set autoindent
set smartindent
set softtabstop=2
@iha2
iha2 / tmux.conf
Last active January 2, 2019 04:24
#tmux configuration files
#Scrollback/History limit
set -g history-limit 10000
# easier and faster switching between next/prev window
bind C-p previous-window
bind C-n next-window
# set only on OS X where it's required
#hello
#hello
#hello
#hello
#hello
@iha2
iha2 / .vimrc
Last active January 2, 2019 07:48
vimrc setup
syntax on
set number
set nowrap
set showmode
set tw=80
set smartcase
set smarttab
set smartindent
set autoindent
@iha2
iha2 / cljs-sandbox
Created November 26, 2018 21:33
cljs-sandbox maker
#!/bin/bash
sandboxName=$1
if [ $sandboxName = "" ]; then
sandboxName="cljs-sandbox";
fi
wget https://codeload.github.com/iha2/cljs-sandbox/zip/master
unzip master
@iha2
iha2 / webcam-epic.ts
Last active August 12, 2018 22:17
a redux observable epic that controls and uses a webcam.
const initializeWebcamEpic = (actions$: ActionsObservable<StartWebcamAction>) =>
actions$.pipe(
ofType(WebcamActionTypes.START_WEBCAM),
switchMap(({ payload }) => {
let timerIntervalMultiple = 0;
return initializeWebcam(payload.videoElement, payload.canvasElement).pipe(
tap(_ => (timerIntervalMultiple += 1)),
filter(_ => (timerIntervalMultiple * 40 > 200 ? true : false)),
map(_ => payload.canvasElement.toDataURL('image/jpeg', 1.0)),
map(jpeg => storeImage(jpeg))