Skip to content

Instantly share code, notes, and snippets.

# Make vimium behave like vimperator@firefox
map d removeTab
map ge previousTab
map gr nextTab
map u restoreTab
# Use smooth scrolling
# Use the link's name and numbers for link-hint filtering
# Don't let pages steal the focus on load
@thfrei
thfrei / progressbar.html
Created February 3, 2017 12:09
Progress Bar with ticks
<!-- Source: http://codepen.io/anon/pen/egrGVL - Captain Anononymous -->
<div class="timeline-container">
<div class="timeline">
<!-- TIMELINE PROGRESS BAR OUTER STROKE -->
<div class="progress-timeline-border ">
<!-- TIMELINE PROGRESS BAR -->
<div class="progress-timeline">
<!-- CURRENT MILEAGE MARKER -->
<div class="timeline-marker" style="left: 125px">
<div class="timeline-current-mileage">
@thfrei
thfrei / bootstrap-vertical-grid.css
Created January 27, 2017 09:44 — forked from metaist/bootstrap-vertical-grid.css
Bootstrap vertical grid. For laying out full-screen fixed height webapps.
.container-fixed {
bottom: 0;
position: fixed;
left: 0;
right: 0;
top: 0;
}
.container-fixed .col {
height: 100%;
@thfrei
thfrei / param serialize
Created January 6, 2017 10:45 — forked from yakirn/param serialize
A modified version of serialize and param methods from zeptos, that depends on _ as a global var (tested on [email protected])
/* the following serialize and param methods are a version of zepto's
* https://github.com/madrobby/zepto/blob/601372ac4e3f98d502c707bf841589fbc48a3a7d/src/ajax.js#L344-L370
* modified to use _ (tested on [email protected], should also work in underscore)
* to use with github's fetch:
fetch(urrl, {
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded'
}
"3.13.1 (created: 2016/05/04 01:34:00)
noremap e :emenu<Space>
noremap ge gT
noremap gr gt
noremap v :emenu<Space>Tools.Downloads<Return>
noremap xd :tabonly<Return>|:open<Space>about:blank<Return>
source! "C:\\Users\\windo\\_vimperatorrc.local"
" vim: set ft=vimperator:
// http://stackoverflow.com/questions/12064040/javascript-what-is-the-best-method-when-creating-chainable-functions - Olegas
function test() {
// when test() is called as a regular function
// it's `this` will be `undefined` (in strict mode) or will refer to a global object
// when test() is called with `new` operator
// it's `this` will be an instance of `test` object
if(!(this instanceof test)) {
// create a new object
return new test();
@thfrei
thfrei / CAcfp.js
Last active May 6, 2016 14:06
Communicative Act Library suggestion for eve agents: Contract Net Interaction Protocol (call for proposal)
// Suggestion for a communicatve act library for agent communication in Javascript.
// Initiator:
agent
.communication('cfp', 'initiator')
.recipient(adressOfResponder)
.cfp(function)
.onRefuse(function)
.onPropose(function)
.onFailure(function)