Skip to content

Instantly share code, notes, and snippets.

Franco Biasin frankitox

Block or report user

Report or block frankitox

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@frankitox
frankitox / c.vim
Last active Jun 19, 2019
cVim config
View c.vim
set noautofocus
map m* setMark
map <A-p> pinTab
map <C-h> previousTab
map <C-l> nextTab
map <C-j> scrollFullPageDown
map <C-k> scrollFullPageUp
map $ lastTab
" Open new tab with current URL
map T :tabnew @%<CR>
@frankitox
frankitox / prepare-commit-msg
Last active May 21, 2018
Git hook to prepend Jira ticket code.
View prepare-commit-msg
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD | grep -Po '[A-Z]{4}-[0-9]{4,5}')
BRANCH_NAME="${BRANCH_NAME##*/}"
View haskell-types-and-typeclasses.markdown

Static/dynamic, strong/weak typing.

You have discovered a soft spot in the terminology that amateurs use to talk about programming languages. Don't use the terms "strong" and "weak" typing, because they don't have a universally agreed on technical meaning. By contrast, static typing means that programs are checked before being executed, and a program might be rejected before it starts. Dynamic typing means that the types of values are checked during

@frankitox
frankitox / addEventListener.js
Last active Aug 29, 2015
Cross-Browser event attach handler
View addEventListener.js
// Crossbrowser event attacher.
var addEventListener = function (elem, evento, handler) {
console.assert(elem.addEventListener || elem.attachEvent, "Can't find an event handler.");
if (elem.addEventListener) {
elem.addEventListener(evento, function (e) {
if (handler.call(elem, e) === false)
e.preventDefault();
});
} else if (elem.attachEvent) {
elem.attachEvent('on' + evento, function (e) {
You can’t perform that action at this time.