Skip to content

Instantly share code, notes, and snippets.

View rendrap's full-sized avatar

Rendra rendrap

View GitHub Profile
@rendrap
rendrap / grokking_to_leetcode.md
Created February 11, 2022 08:04 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@rendrap
rendrap / reset.css
Created August 19, 2021 06:24
Meyer CSS Reset
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@rendrap
rendrap / vim_cheatsheet.txt
Created July 22, 2021 01:45 — forked from fernandes/vim_cheatsheet.txt
my vim cheatsheet.txt
## Vim
### Basic
enable line numbers :set number | :set nu
disable line numbers :set nonumber | :set nonu | :set nu!
enable relative numbers :set relativenumber
convert entire word to uppercace <leader>u
convert entire word to lowercase <leader>l
convert first char of word to uppercase <leader>U
convert first char of word to lowercase <leader>L
# -*- coding: utf-8 -*-
# Definindo numpy
import numpy as np
# Criando uma matriz
a = np.random.random_integers(0, 4, (3, 3))
print ("Matriz A\n", a)
b = np.random.random_integers(0, 4, (3, 3))
print ("Matriz B\n" ,b)
<!-- Prevent FOUC (flash of unstyled content) - http://johnpolacek.com/2012/10/03/help-prevent-fouc/ -->
<style type="text/css">
.no-fouc {display: none;}
</style>
<script type="text/javascript">
document.documentElement.className = 'no-fouc';
// add to document ready: $('.no-fouc').removeClass('no-fouc');
</script>
@rendrap
rendrap / webstoemp-gulpfile.js
Created October 24, 2019 17:16 — forked from jeromecoupe/webstoemp-gulpfile.js
Gulp 4 sample gulpfile.js. For a full explanation, have a look at https://www.webstoemp.com/blog/switching-to-gulp4/
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@rendrap
rendrap / .block
Last active April 10, 2019 04:10
Barley Yield Transition Starter
license: mit
@rendrap
rendrap / .block
Last active April 10, 2019 04:12
Barchart Transitions: example
license: mit
@rendrap
rendrap / .block
Last active March 25, 2019 14:19
barchart - finish
license: mit
@rendrap
rendrap / grok_vi.mdown
Created March 4, 2019 14:12 — forked from nifl/grok_vi.mdown
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)