Skip to content

Instantly share code, notes, and snippets.

@megalithic
megalithic / stuff
Created February 7, 2013 16:25
i think we just need to wrap it in a document.ready basic.
$(function() {
$(".prep-select").html('<%= select_tag("recipe_ingredients[#{@recipe_ingredient.id}][prep_action_id]", options_from_collection_for_select(@preps, :id, :name, @recipe_ingredient.prep_action_id), {include_blank: true, prompt: 'Select Prep Action', class: 'chzn'}).gsub(/n/, '') %>');
$(".prep-select").append("<option value=''> Select a Prep Option </option>");
});
@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/
@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
import React, { Component, PropTypes } from 'react'
export default class Search extends Component {
static propTypes = {
onChange: PropTypes.func
}
constructor (props) {
super(props)
}
// Header styles.
//
// - Main wrapper
// - Search box
// - Message center
// - Main nav
// - User wallet
// Main wrapper.

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:

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):

@megalithic
megalithic / setup.md
Last active June 18, 2016 11:42
AKiTiO Thunder2 & EVGA 960 GTX SC setup
@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 / 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()