Skip to content

Instantly share code, notes, and snippets.

@bitburnerz
bitburnerz / main
Last active November 23, 2017 19:15
fn main() {
let myvec: Vec<String> = vec!("string1".to_string(),
"string2".to_string(),
"string3".to_string(),
"string4".to_string(),
"string5".to_string(),
"string6".to_string(),
);
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<link href="https://code.jquery.com/qunit/qunit-git.css" rel="stylesheet" type="text/css" />
<script src="https://code.jquery.com/qunit/qunit-git.js"></script>
@bitburnerz
bitburnerz / 0_reuse_code.js
Created August 10, 2017 21:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@bitburnerz
bitburnerz / index.html
Created July 15, 2017 19:05
JS Bin [*this* in get()] // source https://jsbin.com/tumudun
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[*this* in get()]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@bitburnerz
bitburnerz / index.html
Created July 13, 2017 21:26
JS Bin [add your bin description] // source https://jsbin.com/yevayit
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@bitburnerz
bitburnerz / grok_vi.mdown
Created November 9, 2015 21:36 — forked from nifl/grok_vi.mdown
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)