Skip to content

Instantly share code, notes, and snippets.

View r17x's full-sized avatar
🤘
REconciling...

RiN r17x

🤘
REconciling...
View GitHub Profile
Plug 'kablamo/vim-git-log'
Plug 'gregsexton/gitv'
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'christoomey/vim-conflicted'
Plug 'mattn/webapi-vim'
Plug 'mattn/vim-gist'
"
@r17x
r17x / log.bash
Last active June 27, 2020 11:38
Esy failed to start
𝝀 ~/evl/project esy start 23s
info building [email protected]@d41d8cd9
info building [email protected]@d41d8cd9: done
info building @opam/ocamlfind@opam:1.8.1@ff07b0f9
info building @opam/ocaml-secondary-compiler@opam:4.08.1-1@ba28931b
info building @opam/ocamlbuild@opam:0.14.0@6ac75d03
info building @opam/cmdliner@opam:1.0.4@93208aac
info building @opam/cmdliner@opam:1.0.4@93208aac: done
info building @opam/seq@opam:base@d8d7de1d
info building @opam/seq@opam:base@d8d7de1d: done
@r17x
r17x / tmux_basic_usage.md
Created June 22, 2020 08:53 — forked from mberkowski/tmux_basic_usage.md
Tmux Basic Usage

Basic Tmux Usage

https://tmux.github.io/ <-- Tmux project

http://z.umn.edu/tmuxgist <-- this document!

The Prefix Keystroke Ctrl-b

  • Crtl-b c Create a new window
  • Crtl-b <N> Switch to window <N>
  • Crtl-b ? List available keystrokes
  • Crtl-b , Rename current window
@r17x
r17x / SOS.md
Created May 10, 2020 17:51 — forked from vodik/SOS.md
_Never_ -Sy when installing!

Once upon a time there was a user that wanted to install firefox.

The user tried to do pacman -S firefox but it didn't work. The all mighty pacman reported that firefox-3.2.4-1.i686.pkg.tar.gz could not be found on his mirror. So the user tried pacman -Sy firefox. It worked and the user rejoiced since he could once again go and troll /h/.

But all was not good. The user had made a grave error!

See, when the user told the almighty pacman to -Sy firefox, pacman did

@r17x
r17x / useRef.md
Created March 16, 2020 18:20
ReasonReact.useRef

reasonml/reason-react#407 (comment)

let inputRef = React.createRef();
<input ref={ReactDOMRe.Ref.domRef(inputRef)} type="text" />
If React.createRef is not available in your current version, simply use:
let inputRef = React.useRef(Js.Nullable.null);
<input ref={ReactDOMRe.Ref.domRef(inputRef)} type="text" />
In case that you want to convert Js.Nullable.t to option beforehand:
open Belt;
[@bs.deriving abstract]
type queryConfig('data, 'key, 'fnParamsFilter) = {
[@bs.optional]
retry: int,
[@bs.optional]
retryDelay: int,
[@bs.optional]
initialData: unit => 'data,
@r17x
r17x / API.re
Created February 22, 2020 12:52
/* https://api.github.com/users/ri7nz */
open Relude.Globals;
// Define Error, that consume in IO (sideEffect)
module Error = {
type t = ReludeFetch.Error.t(string);
let show = error => ReludeFetch.Error.show(a => a, error);
module Type = {
type nonrec t = t;
}
@r17x
r17x / machine.js
Last active January 25, 2020 03:04
Generated by XState Viz: https://xstate.js.org/viz
/*
* @see { https://codesandbox.io/s/belajar-xstate-ezf3z }
*/
async function invokeFetchSubreddit(context) {
const { subreddit } = context;
const response = await fetch(`https://www.reddit.com/r/${subreddit}.json`);
const json = await response.json();
console.log(json);
return json.data.children.map(child => child.data);
@r17x
r17x / hosts
Created January 6, 2020 10:50
UNBLOCK-everything
# Static table lookup for hostnames.
# See hosts(5) for details
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
# [OPENLOAD.CO]
104.16.166.50 openload.co www.openload.co
104.16.165.50 t1.openload.co
104.16.164.50 tt1.openload.co
104.16.164.50 api.openload.co
@r17x
r17x / mutt_mbsync_multipleaccounts.md
Created November 3, 2019 15:50 — forked from chandraratnam/mutt_mbsync_multipleaccounts.md
Mutt + isync mbsync + gmail + multiple accounts.

Mutt + isync multiple accounts Unfinished

This is the setup that I use for mutt, I have two google domain account (read as gmail) and an institution where I work and study account. This means I have two gmail accounts and one outlook 365 account that i want to sync and read via mutt.

I want to store all my email locally as I travel a lot and will be in countries without easy internet access. For this I use mbsync (iSync). As it can handle multiple account types easily and efficently.

The setup works this way

[Remote Mail Servers] <= mbsync => [Local Mail Folders]