Skip to content

Instantly share code, notes, and snippets.

@megalithic
megalithic / Index.elm
Last active October 19, 2018 15:08
compilation output from Index.elm
The argument to function `map` is causing a mismatch.
51| Task.map initModel
^^^^^^^^^
Function `map` is expecting the argument to be:
a
-> { appConfig : Config.Config
, confirmationModal : Components.ConfirmationModal.Model
, jwt : UserJwt
@megalithic
megalithic / catch_fn.lua
Created June 1, 2017 19:11 — forked from zzamboni/catch_fn.lua
How to catch the fn key using Hammerspoon
-- Catch fn-h and convert it to a left arrow key.
function catcher(event)
if event:getFlags()['fn'] and event:getCharacters() == "h" then
print("fn-h!")
return true, {hs.eventtap.event.newKeyEvent({}, "left", true)}
end
return false
end
local tapper=hs.eventtap.new({hs.eventtap.event.types.keyDown}, catcher):start()
@megalithic
megalithic / termception.scpt
Last active February 19, 2017 02:21
open a selected file in finder within a new tmux window within an iTerm2 (termception).. dump this into an automator doc and save it as an app:
set filename to POSIX path of input
set cmd to "cd `dirname " & filename & "`; vim " & filename
tell application "iTerm"
tell the current window
# Uncomment the next line if you want to create a new iTerm tab instead.
#create tab with default profile
tell the current session
tell application "iTerm" to activate
delay 1
@megalithic
megalithic / setup.md
Last active June 18, 2016 11:42
AKiTiO Thunder2 & EVGA 960 GTX SC setup

Start weechat if you haven't already:

$ weechat

open up browser and go to: https://irc.gitter.im/ retrieve your /PASS

In weecaht run (thanks to raine):

Keybase proof

I hereby claim:

  • I am megalithic on github.
  • I am megalithic (https://keybase.io/megalithic) on keybase.
  • I have a public key whose fingerprint is BA52 D71C 67F0 08C1 CCBC 5C60 E4D5 E30E B5A3 267B

To claim this, I am signing this object:

// Header styles.
//
// - Main wrapper
// - Search box
// - Message center
// - Main nav
// - User wallet
// Main wrapper.
import React, { Component, PropTypes } from 'react'
export default class Search extends Component {
static propTypes = {
onChange: PropTypes.func
}
constructor (props) {
super(props)
}
@megalithic
megalithic / gist:6198734
Created August 10, 2013 02:13
command WON'T run from within vim using vim's command line input, but WILL run from a zsh prompt
# the output of executing the command below, if i execute `karma run` from a zsh prompt, it runs just fine.. thoughts on how to fix?
:!karma run
zsh:1: command not found: karma
shell returned 127
Press ENTER or type command to continue
@megalithic
megalithic / gist:4942080
Last active December 13, 2015 16:39
attempt at highlighting debugger type of terms on write/read; specifically for js and rb files for now.
highlight javascriptDebugger guifg=white guibg=red ctermfg=white ctermbg=red
syntax match javascriptDebugger /debugger/