Skip to content

Instantly share code, notes, and snippets.

@vjaro
vjaro / grokking_to_leetcode.md
Created April 23, 2022 19:36 — 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

@vjaro
vjaro / Email Server (Linux, Unix, Mac).md
Created February 27, 2020 15:22 — forked from raelgc/Email Server (Linux, Unix, Mac).md
Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

Setup a Local Only SMTP Email Server (Linux, Unix, Mac)

1 - Point localhost.com to your machine

Most of programs will not accept an email using just @localhost as domain. So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:

127.0.0.1 localhost.com

2 - Install Postfix

@vjaro
vjaro / mysql-docker.sh
Created September 8, 2017 04:43 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
// iMacro CheatSheet - Command Reference
// http://wiki.imacros.net/Command_Reference
// iMacros supports 3 types of variables:
// * The macro variables !VAR0 thru !VAR9. They can be used with the SET and ADD command inside a macro.
// * Built-in variables. They contain certain values set by iMacros.
// * User-defined variables. They are defined in-macro using the SET command.
@vjaro
vjaro / es.sh
Created September 1, 2014 09:05 — forked from rajraj/es.sh
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.i686 -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
<?php
$sugar_config_si = array(
'setup_db_host_name' => 'localhost',
'setup_db_sugarsales_user' => 'sugarcrm',
'setup_db_sugarsales_password' => 'DB_USER_PASSWORD',
'setup_db_database_name' => 'sugarcrm',
'setup_db_type' => 'mysql',
'setup_db_pop_demo_data' => false,
<?php
$sugar_config_si = array(
'setup_db_host_name' => 'localhost',
'setup_db_sugarsales_user' => 'sugarcrm',
'setup_db_sugarsales_password' => 'DB_USER_PASSWORD',
'setup_db_database_name' => 'sugarcrm',
'setup_db_type' => 'mysql',
'setup_db_pop_demo_data' => false,