Skip to content

Instantly share code, notes, and snippets.

View eprev's full-sized avatar
💭
I may be slow to respond.

Anton Eprev eprev

💭
I may be slow to respond.
View GitHub Profile
@eprev
eprev / zetz
Created January 17, 2022 22:24 — forked from guychouk/zetz
⚡️ Zetz: A script for managing notes in the Zettelkasten method.
#!/usr/bin/env zsh
# _
# _______| |_ ____
# |_ / _ \ __|_ /
# / / __/ |_ / /
# /___\___|\__/___|
#
# The most basic note taking app for the terminal.
#
@eprev
eprev / index.html
Last active November 27, 2017 21:49
Matrix #jsbench #jsperf (http://jsbench.github.io/#bc7114fdf7d9398c461f79c028f48abd) #jsbench #jsperf
<!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>
@eprev
eprev / index.html
Last active November 27, 2017 21:40
RAM access #jsbench #jsperf (http://jsbench.github.io/#b368dc091e0fdba446845b8756efdbbc) #jsbench #jsperf
<!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>
// 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);

Basics

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
'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':
if (typeof Element.prototype.matches !== 'function') {
Element.prototype.matches = Element.prototype.msMatchesSelector;
}
" File: css-sorting.vim
" Maintainer: Anton Eprev (eprev@me.com)
" 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:
@eprev
eprev / QLMarkdown.md
Last active January 25, 2021 22:08
GitHub Markdown style for QLMarkdown

GitHub Markdown style for QLMarkdown

Based on GitHub Markdown CSS.

Installation:

  1. Got to /Library/Quick Look or ~/Library/Quick Look and find QLMarkdown.qlgenerator.
  2. Open contextual menu for it and choose Show Package Contents.
  3. Go to Contents/Resources and find styles.css.
  4. Open it and replace its contents with the contents of this Gist.