Skip to content

Instantly share code, notes, and snippets.

View maxArturo's full-sized avatar

Max Arturo AS maxArturo

View GitHub Profile
@maxArturo
maxArturo / docker-osx-shared-folders.rst
Created March 2, 2016 16:23 — forked from codeinthehole/docker-osx-shared-folders.rst
How to share folders with docker containers on OSX

How to share a folder with a docker container on OSX

Mounting shared folders between OSX and the docker container is tricky due to the intermediate boot2docker VM. You can't use the usual docker -v option as the docker server knows nothing about the OSX filesystem - it can only mount folders from the boot2docker filesystem. Fortunately, you can work around this using SSHFS.

@maxArturo
maxArturo / .eslintrc
Last active November 24, 2015 22:00
eslintrc proposal
{
// we want to use babel-eslint
"parser": "babel-eslint",
"env": {
// we don't need browser global vars
"browser": false,
// we do need node global vars
"node": true,
"mocha": true
},
@maxArturo
maxArturo / The Technical Interview Cheat Sheet.md
Last active April 23, 2020 10:00 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.

Keybase proof

I hereby claim:

  • I am maxArturo on github.
  • I am maxarturo (https://keybase.io/maxarturo) on keybase.
  • I have a public key whose fingerprint is A17E B54E A6D2 CF60 55C6 F358 37AC A163 F412 F646

To claim this, I am signing this object:

@maxArturo
maxArturo / provision_script.sh
Last active November 11, 2015 00:08
Standard Vagrant provisioning script for Rails 4.2 app
#!/bin/bash
# use these flags to install the services you need.
INSTALL_POSTGRES=
INSTALL_MYSQL=true
INSTALL_DOCKER=
INSTALL_REDIS=
INSTALL_RUBY=true
# specify your versions and db configs below
@maxArturo
maxArturo / Readme.md
Last active August 29, 2015 14:14
Movie Nodes!

This simple example explores relationships of moves by their titles - at random!

This is a simple hack-up to explore movies/shows that contain the same word in their title. using the OMDB Api and d3.js, the script pulls in the 10 next-to-kin movies and makes a force directed graph.

  • Clicking on a title will add the next-of-kin movies, as determined by the top 10 results from a random word of the title, other than the initial search
  • Clicking on a node will take you to the IMDB page of the movie for your viewing pleasure(you can run into some incredibly obscure movies this way...)

It starts out with an arbitrary word (in this case beautiful), a nice to do would be to add a text box for a starting search of your choice.

You're going to need to host this in a server or in a fiddle to get the ajax requests going.

@maxArturo
maxArturo / Readme.md
Last active August 29, 2015 14:12
Text Justify(Hard?)

Following with the "I'm sure there's some sort of implementation of this algorithm in MS Office" trend, here's a text justifying one - again from leetcode.

Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.

You should pack your words in a greedy approach; that is, pack as many words as you can in each line. Pad extra spaces ' ' when necessary so that each line has exactly L characters.

Extra spaces between words should be distributed as evenly as possible. If the number of spaces on a line do not divide evenly between words, the empty slots on the left will be assigned more spaces than the slots on the right.

For the last line of text, it should be left justified and no extra space is inserted between words.

@maxArturo
maxArturo / Readme.md
Last active August 29, 2015 14:12
Excel Sheet Columns

Leetcode problem: Excel Columns

I was looking at leetcode and found this problem. I got nostalia'd hard since I actually started out writing VBA for Excel, and I know there has to be this algorithm somewhere in the Excel code.

Given a positive integer, return its corresponding column title as appear in an Excel sheet.

For example:

1 -> A
2 -> B

3 -> C

@maxArturo
maxArturo / Readme.md
Last active August 29, 2015 14:11
Sieve of Erathosthenes

##Visualized Sieve of Erathosthenes## After starting to refresh myself up on algorithms, I rediscovered this old favorite. It is an old, old algorithm to find prime numbers. Alas - I struggled for a bit on the assumptions (such as starting on n^2 for each sequential sieve iteration). Once I fully understood it, I was left with a want to visualize the iterations. As such, I've made this visualization to hopefully help anyone just first encountering the algorithm.

  • The current number used for sieving is indicated with a pipeline
  • Numbers which are sieved are highlighted in the color of their factor
  • Numbers which have been used to sieve are underlined, and
  • A circle jumps around to indicate the square of the current sieving number.

It is not optimized, so as to demonstrate the need to jump over previously-sieved numbers, as well as to show the effects of starting at n^2 with a highlighted circle.