Skip to content

Instantly share code, notes, and snippets.

View FabioAntunes's full-sized avatar
yolo

Fábio Antunes FabioAntunes

yolo
View GitHub Profile
# 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 ->
@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
@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 / 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 / pipeline-operator.js
Created March 25, 2018 22:50
Example of Pipeline Operator proposal
// Some functions that do string operations
function doubleSay (str) {
return str + ", " + str;
}
function capitalize (str) {
return str[0].toUpperCase() + str.substring(1);
}
function exclaim (str) {
return str + '!';
}
let addOne
function add(x, y) { return x + y }
addOne = add.bind(null, 1)
addOne = x => add(1, x)
// new syntax
addOne = add(1, ?)
@FabioAntunes
FabioAntunes / realms-proposal.js
Created March 26, 2018 00:03
Realm proposal exam ple
let realm = new Realm();
let outerGlobal = window;
let innerGlobal = realm.global;
let f = realm.evalScript("(function() { return 17 })");
f() === 17 // true
Reflect.getPrototypeOf(f) === outerGlobal.Function.prototype // false

Keybase proof

I hereby claim:

  • I am fabioantunes on github.
  • I am fabioantunes (https://keybase.io/fabioantunes) on keybase.
  • I have a public key ASDeBx8hIL-8a0CHu8aEKypUzXjfmHNvg9V7o3kTaaGGjwo

To claim this, I am signing this object:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDqH04YiXze0cyRGsMDhYwSAEijcRz++36X7UuhEFclR/Y3umYGtYS5Wo1cUM58S3PFt5hogYA1PTVOkLaPYiislT8ntXp+wbaYuvfJ20XzvJzSydjHZGoWrTcjc0yJypSP5h4hFutjVKkkCy1OOP8/8sMF4G2DNow0NpfWAoyJEP4cFynOLvlexSWGVqYL2w3YtHxPyGmj/X3ToLcHzNgt2gHsvV+eSMIWU4sN+BIrEh/7ALKXT8aCGlnqhayxOhhmFvOmMV226/T6WpZEk7WeIIMTTMIcy6kmNQMzf6wEJkC98xuEZOJ8qp4AeJRFGxB/5zLlpZSmblaHmSzvo2/YoZgo0PyIh21FhIDNdhy2vwgXeVa1MFNvOoz/bMIilU1S6O3VmHuNyF2d3JM/qWhsKLl2bLzQFDFSVUZnXQjis7CMGOss6D2/fYoKRFMjsvy0gMzo0yVSRKz2h33TW9raYblB19N9BBz0M37YdQdvBoZy7asW3SX1zXNWtdMd4VAxteszSAHdJ9p6CceY04NGhNyXmHwUMLgEsQ2qC3hnoPGkEug/gZtCubfhSqBQGXAv9xgOA4H2F/webzYWwznZQnfLkmbdRWGTimtVkqXufjOiLFeLmHbzgj1DYjwRewaza6jT+HDcoiePSGHwG4Hz9wBi98Twz3H5uXI2gl3LfQ== fabioantuness@gmail.com
set -l okta_commands add exec help login version
complete -f -c aws-okta -n "not __fish_seen_subcommand_from $okta_commands" -a $okta_commands