Skip to content

Instantly share code, notes, and snippets.

Visual mode

  • v: character
  • Shift + v: whole line
  • Ctrl + v: cursor, multiple lines

Navigation

  • h,j,k,l
  • f{c}: move to c character (useful for characters which would otherwise mess with / regex search: .,,,;,:, etc.)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Font
:set guifont=Source\ Code\ Pro:h14
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Hide pointless junk at the bottom, doesn't work in .vimrc for some reason?
:set laststatus=0
:set noshowmode "don't show --INSERT--
:set noruler "don't show line numbers/column/% junk
@swalkinshaw
swalkinshaw / tutorial.md
Last active November 13, 2023 08:40
Designing a GraphQL API
@JUNNETWORKS
JUNNETWORKS / libinput-gestures.conf
Created May 5, 2018 21:42
Cinnamon touchpad gestures like windows10 for libinput-gestures
# show all windows in workspace
gesture swipe up 3 xdotool key alt+control+Down
# show Desktop
gesture swipe down 3 xdotool key super+d
# move current workspace for left
gesture swipe left 4 xdotool key alt+control+Right
# move current workspace for right
@martinheidegger
martinheidegger / debug-promise.js
Last active July 20, 2017 01:30
An approach to debug promises that have not yet finished when the process is exited.
'use strict'
const DATE_MAX = (36 * 36 * 36 * 36 * 36) // Since we use base 36 this should give us 5 characters
const RANDOM_MAX = 100000
function createId () {
// ID consistent of a time aspect as well as a random aspect to make sure two Promises
return `${(Date.now() % DATE_MAX).toString(36)}-${(Math.random() * RANDOM_MAX | 0).toString(36)}`
}
@yhuard
yhuard / package.json
Created February 16, 2017 10:32
Browsersync proxy example
{
"name": "browsersync-proxy-example",
"version": "1.0.0",
"description": "",
"main": "proxy.js",
"scripts": {
"start": "node ./proxy.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
@idkw
idkw / geometry_geojson.yaml
Last active July 18, 2019 15:33 — forked from bubbobne/geometry_geojson.yaml
A swagger geojson geometry description
swagger: '2.0'
info:
version: "1.0.0"
title: GeoJSON geometry
description: An example of swagger file for a geographic API. It contains the geometry definitions
termsOfService: "no"
contact:
name: Daniele Andreis
email: daniele.andreis@gmail.com
url: ""
@chrissimpkins
chrissimpkins / gist:5bf5686bae86b8129bee
Last active March 6, 2023 00:10
Atom Editor Cheat Sheet: macOS

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on macOS.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@wvengen
wvengen / extend.sh
Last active April 22, 2024 14:02
Extend non-HiDPI external display above HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
@staltz
staltz / introrx.md
Last active April 29, 2024 09:25
The introduction to Reactive Programming you've been missing