Skip to content

Instantly share code, notes, and snippets.

View FourSeventy's full-sized avatar
🏋️‍♂️
Fiddling with .vimrc

Mike Signorella FourSeventy

🏋️‍♂️
Fiddling with .vimrc
  • Boston, MA
View GitHub Profile
@FourSeventy
FourSeventy / oh.rb
Last active April 5, 2018 14:40
O(n^2) vs O(n) Example
require 'benchmark'
require 'set'
#Determines which customers have paid their monthly balance
#by comparing them to a list of known paid customers.
#O(n^2) solution
def example1
paid_customers = get_huge_array_of_customers
customers = get_huge_array_of_customers
@FourSeventy
FourSeventy / cmd.sh
Last active February 24, 2019 20:05
Useful Commands
# netcat port scanning
nc -zv host-name port-range
sudo nc -zv -w 2 10.150.0.3 1-1023
#find out what process is using what port
lsof -i :port
sudo lsof -i :80
#list what ports a process is using
lsof -Pan -p PID -i