Skip to content

Instantly share code, notes, and snippets.

View ultim8k's full-sized avatar
🛠️
Rock & roll!

Kostas Kapenekakis ultim8k

🛠️
Rock & roll!
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ultim8k on github.
  • I am ultim8k (https://keybase.io/ultim8k) on keybase.
  • I have a public key ASD2xPoCw-slPy8L8t8FO8LQIlPQMnvzKcAWiF3GVMjXKwo

To claim this, I am signing this object:

>Jarvis, do me a favor and blow Mark 42 Galaxy Note 7

@ultim8k
ultim8k / vim-multiline-comment.md
Last active August 11, 2025 08:56
(un) comment multiple lines vim

From: http://stackoverflow.com/questions/1676632/whats-a-quick-way-to-comment-uncomment-lines-in-vim

For those tasks I use most of the time block selection.

Put your cursor on the first # character, press Ctrl``V (or Ctrl``Q for gVim), and go down until the last commented line and press x, that will delete all the # characters vertically.

For commenting a block of text is almost the same: First, go to the first line you want to comment, press Ctrl``V, and select until the last line. Second, press Shift``I``#``Esc (then give it a second), and it will insert a # character on all selected lines. For the stripped-down version of vim shipped with debian/ubuntu by default, type : s/^/# in the second step instead.

foo bar foo bar

foo bar foo bar caption

foo bar foo bar

foo bar

<!DOCTYPE html>
<html lang="en" class="-capitalise-normal">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>An amazing site</title>
<style>
@media (max-width: 480px) {
.page-title {
@ultim8k
ultim8k / sync-async-chain.js
Created May 18, 2017 16:30
Chaining sync with async functions
function giveLater (num) {
return new Promise (function (resolve, reject) {
setTimeout(function () {
if (num) {
resolve(num);
return false;
}
reject('num is empty');
@ultim8k
ultim8k / .editorconfig
Created September 14, 2017 22:17
project dotfiles
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
@ultim8k
ultim8k / Default (OSX).sublime-keymap
Created October 16, 2017 09:42
My personal quick and hacky keymap for sublime text
/*
User's sublime-keymap
*/
[
{"keys": ["super+t"], "command": "new_file"},
{"keys": ["super+shift+c"], "command": "insert_snippet", "args": {"contents": "console.log(${1:$TM_SELECTED_TEXT});${0}"}}
]
@ultim8k
ultim8k / .editorconfig
Created October 31, 2017 21:32
New web project starter pack
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true