Read-Write | |
---|---|
:e[dit] [file] | Edit File |
:w[rite] [file] | Write File |
:w[rite] !sudo tee % | Write File with Root Permission |
:sav[eas] {file} | Save File As and Open It |
:q | Exit Vim |
:q! | Quit Without Saving |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# _ | |
# _______| |_ ____ | |
# |_ / _ \ __|_ / | |
# / / __/ |_ / / | |
# /___\___|\__/___| | |
# | |
# The most basic note taking app for the terminal. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Matrix #jsbench #jsperf</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>RAM access #jsbench #jsperf</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: copyToClipboard('Hello'); | |
const copyToClipboard = (function(){ | |
let textToCopy; | |
let clearSelection = false; | |
let didCopy = false; | |
document.addEventListener('copy', e => { | |
if (textToCopy !== undefined) { | |
try { | |
e.clipboardData.setData('text/plain', textToCopy); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// See http://eprev.org/2017/01/04/the-importance-of-html-character-encoding/ | |
const http = require('http'); | |
http.createServer((request, response) => { | |
let charset; | |
switch (request.url) { | |
case '/charset-is-specified': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof Element.prototype.matches !== 'function') { | |
Element.prototype.matches = Element.prototype.msMatchesSelector; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" File: css-sorting.vim | |
" Maintainer: Anton Eprev ([email protected]) | |
" Last Change: 2016-04-27 | |
" License: MIT | |
" URL: https://gist.github.com/eprev/bf2cee9b211505f60ce826762e3b2a1c | |
" | |
" Exposes a command to execute the postcss-sorting plugin. You'll need to install | |
" the dependencies: `npm install -g postcss-cli postcss-sorting`. | |
" | |
" Copy `css-sorting.vim` to `~/.vim/plugin` and add the mappings: |
GitHub Markdown style for QLMarkdown
Based on GitHub Markdown CSS.
Installation:
- Got to
/Library/Quick Look
or~/Library/Quick Look
and findQLMarkdown.qlgenerator
. - Open contextual menu for it and choose
Show Package Contents
. - Go to
Contents/Resources
and findstyles.css
. - Open it and replace its contents with the contents of this Gist.