Skip to content

Instantly share code, notes, and snippets.

View bhagatparwinder's full-sized avatar
♥️
Happy, cheerful & confident!

Parwinder Bhagat bhagatparwinder

♥️
Happy, cheerful & confident!
View GitHub Profile
@bhagatparwinder
bhagatparwinder / npm-upgrade-bleeding.sh
Created January 22, 2020 15:49 — forked from othiym23/npm-upgrade-bleeding.sh
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@bhagatparwinder
bhagatparwinder / aerial.json
Created October 23, 2018 16:11
Apple TV Aerial Screensavers (including ISS International Space Station)
{
"success": 1,
"data": [{
"name": "Southern California to Baja",
"screensavers": [{
"identifier": "7719B48A-2005-4011-9280-2F64EEC6FD91",
"urls": {
"h264": "https://sylvan.apple.com/Videos/comp_A114_C001_0305OT_v10_SDR_FINAL_22062018_SDR_2K_AVC.mov"
},
"timedCaptions": {
@bhagatparwinder
bhagatparwinder / facebook.js
Created May 9, 2018 05:33
Unfollow all friends on Facebook
// Script to mass unfollow friends on Facebook
// Make sure you are in "News Feed Preferences" -> “Unfollow people to hide their posts”
let d = document.getElementsByClassName("_5u3n");
for (let i = 0; i < d.length; i++){
d[i].click();
}
@bhagatparwinder
bhagatparwinder / linkedin.js
Created May 9, 2018 05:28
Add LinkedIn contacts in My Network
// Run this in your chrome console to add every recommendation LinkedIn has provided
// Change scroll and timeout to your liking and screen/browser window size
// Keep in mind that this will mass add people to your network. Use it wisely
let scroll = 800;
let timeout = 300;
setInterval (() => {
$(".mn-pymk-list__card:first-child").find(".button-secondary-small").click();
window.scrollTo(0, scroll);
@bhagatparwinder
bhagatparwinder / remove_brew_mongo.sh
Created October 10, 2017 19:29
Remove mongodb that was installed by brew
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep mongo
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
launchctl remove homebrew.mxcl.mongodb
pkill -f mongod