Skip to content

Instantly share code, notes, and snippets.

View FabioAntunes's full-sized avatar
yolo

Fábio Antunes FabioAntunes

yolo
View GitHub Profile
@FabioAntunes
FabioAntunes / temporal.js
Created March 25, 2018 22:05
Temporal Proposal api example taken from the original spec
// Properties
let year = civilDateTime.year;
let month = civilDateTime.month;
let day = civilDateTime.day;
let hour = civilDateTime.hour;
let minute = civilDateTime.minute;
let second = civilDateTime.second;
let millisecond = civilDateTime.millisecond;
let nanosecond = civilDateTime.nanosecond;
@FabioAntunes
FabioAntunes / vim-cheat-sheet.md
Last active March 17, 2021 17:06
Vim cheat sheet

Search (and replace)

  • /[pattern] search forward for pattern
  • ?[pattern] search backward for pattern
  • n repeat search forward
  • N repeat search backward
  • * search for word currently under cursor
  • g* search for word partially under cursor
  • [I show lines with matching word under cursor
  • %s/background/&-color/g find and replace background with background-color. & inserts the matched pattern %s/\(foo\)bar/\1baz/g find and replace foobar with foobaz. \1 uses the captured group foo from the \(\)
@FabioAntunes
FabioAntunes / redshift.conf
Created December 1, 2016 16:57
My Redshift config, just shove it on ~/.config/redshift.conf
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=6000
temp-night=3900
; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature
transition=1
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->