Skip to content

Instantly share code, notes, and snippets.

View andreadellacorte's full-sized avatar
🎯
Focusing

Andrea Della Corte andreadellacorte

🎯
Focusing
View GitHub Profile
@andreadellacorte
andreadellacorte / aliases.zsh
Last active May 27, 2020 23:37 — forked from inhji/.zshrc
zsh aliases
alias help='cat ~/.oh-my-zsh/custom/aliases.zsh'
alias aliases='vim ~/.oh-my-zsh/custom/aliases.zsh'
if [[ $OSTYPE == darwin* ]]; then
alias browse="open -a /Applications/Google\ Chrome.app"
alias wp='cd ~/Documents/Github'
elif [[ $OSTYPE == linux-gnu* ]]; then
alias wp='cd /mnt/c/Users/Andrea/Documents/Github/'
fi
@andreadellacorte
andreadellacorte / rails_on_ubuntu_zsh.sh
Last active May 29, 2020 22:24
Rails install on ubuntu + zsh
# Instructions https://cloud.google.com/ruby/rails/appengine
sudo apt-get remove ruby
sudo apt-get install build-essential
sudo apt-get install -y libssl-dev libreadline-dev zlib1g-dev
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
@andreadellacorte
andreadellacorte / query_steam.rb
Created June 2, 2020 23:23
Query Steam w/ Ruby
require 'net/http'
require 'json'
require 'csv'
GEFORCE_NOW_GAMES_URL = 'https://static.nvidiagrid.net/supported-public-game-list/gfnpc.json?JSON'
STEAM_GAME_REVIEWS_URL = 'https://store.steampowered.com/appreviews/'
STEAM_GAME_INFO_URL = "https://store.steampowered.com/api/appdetails/?appids="
def query_url(url, params="")
uri = URI(url + params)
@andreadellacorte
andreadellacorte / query_jira.rb
Created June 5, 2020 16:23
Paginated JIRA query in Ruby
require 'json'
require 'csv'
### This is a function definition; functions are the same kind of thing you
### use in excel, like VLOOKUP - you give them a variable and they do something
### or return some variable; this one is simple, you give it a URL and it
### returns a command to be run in a shell
def make_query(url)
### This makes the request to the url you've requested; think about it as a
### browser window that does things for you and returns you data / html / etc
#!/bin/bash
# Make a PDF look scanned.
# Extracted from https://github.com/baicunko/scanyourpdf and modified for smaller output files (compression lower density).
# Project requires ImageMagick and GhostScript. This will do the trick on Ubuntu:
# sudo apt-get install ghostscript
# sudo apt-get install imagemagick
@andreadellacorte
andreadellacorte / System Design.md
Created January 24, 2021 16:34 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?