Skip to content

Instantly share code, notes, and snippets.

@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()

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

// 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)
}
1 name: "uspto"
2 windows:
3 - name: "services"
4 root: "~/projects/uspto/frontend/"
5 layout: tiled
6 panes:
7 - echo "1"
8 - echo "2"
9 - echo "3"
19 - name: "chats"

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

Using bitlbee with HipChat

Initial setup

  • account add jabber USERNAME@chat.hipchat.com 'PASSWORD'
  • account hipchat set nick_source full_name
  • account hipchat set resource bot
  • account hipchat on
@megalithic
megalithic / vim.rb
Created October 26, 2012 03:17 — forked from mybeky/vim.rb
Vim formula for Homebrew with python, ruby and clipboard enabled
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'https://vim.googlecode.com/hg/', :revision => '2d107086903a'
version '7.3.584'
def install
system "./configure",
"--with-features=huge",
@megalithic
megalithic / vim.rb
Created October 26, 2012 03:07 — forked from voldmar/vim.rb
Fresh homebrew formula for Vim
# To use this recipe you have to:
# $ brew install python --framework
# $ mkdir ~/Frameworks
# $ ln -s "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework" ~/Frameworks
# $ brew install ./vim.rb
require 'formula'
require 'open-uri'
class Vim < Formula