Skip to content

Instantly share code, notes, and snippets.

View bfulop's full-sized avatar
🌊
Getting into the flow

Bálint Fülöp bfulop

🌊
Getting into the flow
View GitHub Profile
@bfulop
bfulop / liftHeads.js
Created April 4, 2019 12:28
Allows you to insert `mj-head` elements anywhere in you tree
const R = require('ramda')
// input: an mjml tree,
// output: head elements are moved to head
const isHead = R.propEq('tagName', 'mj-head')
function iterateTree(acc, val) {
return R.compose(
R.when(
@bfulop
bfulop / setting.toml
Created January 28, 2019 16:43
My Gonvim Settings File
[editor]
# Editor minimum width (>= 800)
width = 800
# Editor minimum height (>= 600)
height = 600
# Gonvim copy the yank text to clipboad
clipboard = false
# Editor font-family, font-size, linespace.
fontFamily = "Hack Bold"
fontsize = 13
@bfulop
bfulop / init.vim
Last active March 21, 2019 16:06
My init.vim
set nonumber
set ignorecase
set smartcase
" set relativenumber
set expandtab
set tabstop=2
set shiftwidth=2
set foldmethod=syntax
set nocompatible
set inccommand=nosplit
@bfulop
bfulop / tymeestimates
Last active February 24, 2018 13:17
Simplest way to export estimates from Tyme App. Copy paste into Script Editor and run
var tyme = Application('Tyme2')
var myproject = tyme.projects().filter(p => p.name() === 'MY PROJECT')[0]
getSpendTimes = t => t.taskrecords().reduce((acc,curr) => acc + curr.timedduration(),0)
getSubTimes = t => t.subtasks().reduce((acc,curr) => acc + getSpendTimes(curr),0)
getTotalSpendTimes = t => getSpendTimes(t) + getSubTimes(t)
@bfulop
bfulop / private.xml
Last active May 29, 2016 13:22
Private xml for Karabiner keyboard shortcut. Switch from Quiver, activate Safari, click on the middle, switch back to Quiver. Effect: start-stop wistia video in the other window, without taking your fingers off from the keyboard and from Quiver
<?xml version="1.0"?>
<root>
<appdef>
<appname>QUIVER</appname>
<equal>com.happenapps.Quiver</equal>
</appdef>
<!-- activate safari -->
<vkopenurldef>
<name>KeyCode::VK_OPEN_URL_SHELL_activate_safari</name>
<url type="shell">
javascript:(function(){var p=document.createElement("p");p.innerHTML="<strong>Loading&hellip;</strong>";p.id="loadingp";p.style.padding="20px";p.style.background="#fff";p.style.left="20px";p.style.top=0;p.style.position="fixed";p.style.zIndex="9999999";p.style.opacity=".85";document.body.appendChild(p);document.body.appendChild(document.createElement("script")).src="https://gist.github.com/ttscoff/6109434/raw/Bullseye.js?x="+(Math.random());})();