Skip to content

Instantly share code, notes, and snippets.

View FourSeventy's full-sized avatar

Mike Signorella FourSeventy

  • Boston, MA
View GitHub Profile
var myChart = Highcharts.chart("performance-by-channel-chart", {
colors: colors,
chart: {
type: "bar",
style: {
fontFamily: '"Inter var",sans-serif',
fontWeight: "normal",
fontSize: '13px',
},
marginRight: 70,
@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