Skip to content

Instantly share code, notes, and snippets.

View PBlanco's full-sized avatar

Peter Blanco PBlanco

View GitHub Profile
@PBlanco
PBlanco / flightMovieLengthChecker.js
Last active March 29, 2017 16:04
Flight movie length checker interviewcake
//https://www.interviewcake.com/question/python/inflight-entertainment
const flightLength = 5 * 60; //minutes
const movieLengths = [30, 15, 12, 90, 17, 45] // movies length in minutes
function twoMoviesInListEqualFlightLength(flightLength, movieLengths) {
let needMovieOfLength = {};
for (let i = 0; i < movieLengths.length; i++) {
let mlength = movieLengths[i];
if (mlength in needMovieOfLength) {
@PBlanco
PBlanco / custom
Created June 26, 2017 13:31
Custom Terminal
#git
alias git-clean="git branch --merged | grep -v "\*" | xargs -n 1 git branch -d"
alias up="git pull && npm i && npm run migrate"
alias gs="git status"
# open applications
alias code='open $@ -a "Visual Studio Code"'
# show or hide hidden files
alias showfiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
@PBlanco
PBlanco / gist:1fe95f0b84e709192419a97c4f82343f
Created January 23, 2025 00:37
LinkedIn ADGuard Rules for Focus
linkedin.com##aside.scaffold-layout__aside[aria-label="LinkedIn News"]
linkedin.com##.news-module__tooltip-content
linkedin.com##aside:has-text("LinkedIn News")
linkedin.com##[id*="feed-right-rail"]
linkedin.com##div[class*="news-module"]
linkedin.com##aside[class*="scaffold-layout"]
linkedin.com##div[class*="artdeco-hoverable-content"]
@PBlanco
PBlanco / li-filter.txt
Last active March 25, 2025 18:56
ADGuard - Block LinkedIn Feeds
linkedin.com##aside.scaffold-layout__aside[aria-label="LinkedIn News"]
linkedin.com##div[class^="scaffold-finite-scroll"]