Skip to content

Instantly share code, notes, and snippets.


Andrea Della Corte andreadellacorte

View GitHub Profile
andreadellacorte / System
Created January 24, 2021 16:34 — forked from vasanthk/System
System Design Cheatsheet
View System

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?
andreadellacorte / query_jira.rb
Created June 5, 2020 16:23
Paginated JIRA query in Ruby
View query_jira.rb
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
andreadellacorte / query_steam.rb
Created June 2, 2020 23:23
Query Steam w/ Ruby
View query_steam.rb
require 'net/http'
require 'json'
require 'csv'
def query_url(url, params="")
uri = URI(url + params)
andreadellacorte / aliases.zsh
Last active May 27, 2020 23:37 — forked from inhji/.zshrc
zsh aliases
View aliases.zsh
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\"
alias wp='cd ~/Documents/Github'
elif [[ $OSTYPE == linux-gnu* ]]; then
alias wp='cd /mnt/c/Users/Andrea/Documents/Github/'
andreadellacorte /
Last active May 29, 2020 22:24
Rails install on ubuntu + zsh
# Instructions
sudo apt-get remove ruby
sudo apt-get install build-essential
sudo apt-get install -y libssl-dev libreadline-dev zlib1g-dev
git clone ~/.rbenv
andreadellacorte /
Created May 24, 2020 19:54
Convert a folder to unix; usage dirdox2unix <folder>
pushd $1
find . -type f -print0 | xargs -0 dos2unix
# Make a PDF look scanned.
# Extracted from 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
View jest.config.js
module.exports = {
projects: [
displayName: "test",
setupFiles: [
testMatch: [
andreadellacorte / stryker.conf.js
Last active October 20, 2019 18:43
View stryker.conf.js
module.exports = function(config) {
mutator: "javascript",
packageManager: "npm",
reporters: ['progress', 'dots'],
testRunner: 'jest',
testFramework: 'jest',
coverageAnalysis: 'off',
fileLogLevel: 'trace',
jest: {
andreadellacorte / gist:8cf8c33d4497a5661c145a31f4338c61
Created October 14, 2018 13:58
Count frequency of words in a text
View gist:8cf8c33d4497a5661c145a31f4338c61
cat text.txt | tr '[:space:]' '[\n*]' | tr -cd "[:alnum:]\n"| tr "[:lower:]" "[:upper:]" | grep -v "^\s*$" | sort | uniq -c | sort -bnr > text.fqr