Skip to content

Instantly share code, notes, and snippets.

@megalithic
megalithic / Index.elm
Last active Oct 19, 2018
compilation output from Index.elm
View 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 Jun 1, 2017 — forked from zzamboni/catch_fn.lua
How to catch the fn key using Hammerspoon
View catch_fn.lua
-- 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()
View weechat-irc-gitter-im.md

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

View keybase.md

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:

View gist:66540111f625a952a569
// Header styles.
//
// - Main wrapper
// - Search box
// - Message center
// - Main nav
// - User wallet
// Main wrapper.
View search.js
import React, { Component, PropTypes } from 'react'
export default class Search extends Component {
static propTypes = {
onChange: PropTypes.func
}
constructor (props) {
super(props)
}
@megalithic
megalithic / radiant
Last active Oct 25, 2015
Radiant Player "now playing" applescript; for use with tmux or other CLI applications
View radiant
#!/usr/bin/env sh
NOW_PLAYING=$(osascript <<EOF
if app_is_running("Radiant Player") then
tell application "Radiant Player"
set artist to current song artist
set track to current song name
set state to player state
if state is 1 then
@megalithic
megalithic / my_model.js
Last active Aug 29, 2015
ampersand view, having a time with model data fetching and binding
View my_model.js
var AmpersandModel = require('ampersand-model');
var config = require('clientconfig');
var Status = require('./status');
var StatusModel = new Status();
var ItineraryModel = AmpersandModel.extend({
props: {
uuid: ['string', true, ''],
userId: ['string', true, ''],
expiredAt: ['string', true, ''],
@megalithic
megalithic / setup.md
Last active Jun 18, 2016
AKiTiO Thunder2 & EVGA 960 GTX SC setup
View setup.md
View bitlbee_debug_output.log
ASAN:SIGSEGV
=================================================================
==12715== ERROR: AddressSanitizer: SEGV on unknown address 0x000000000048 (pc 0x7f6f6b70cf06 sp 0x7ffffb36a460 bp 0x7ffffb36a480 T0)
AddressSanitizer can not provide additional info.
#0 0x7f6f6b70cf05 (/usr/local/sbin/bitlbee+0x70f05)
#1 0x7f6f6b70d2bd (/usr/local/sbin/bitlbee+0x712bd)
#2 0x7f6f6b778de2 (/usr/local/sbin/bitlbee+0xdcde2)
#3 0x7f6f6b76601e (/usr/local/sbin/bitlbee+0xca01e)
#4 0x7f6f6b75c491 (/usr/local/sbin/bitlbee+0xc0491)
#5 0x7f6f6b732cdf (/usr/local/sbin/bitlbee+0x96cdf)