Skip to content

Instantly share code, notes, and snippets.

View raghav4's full-sized avatar
🏠
Working from home

Raghav Sharma raghav4

🏠
Working from home
View GitHub Profile
@raghav4
raghav4 / bot.js
Last active December 10, 2020 04:06
Script to like all the Instagram posts!
function doSomething(random) {
var firstLike = document.querySelector(
'section.ltpMr.Slqrh > span.fr66n > button > div > span > svg[aria-label="Like"]'
);
if (firstLike) {
firstLike.scrollIntoView({
behavior: "smooth",
block: "center",
inline: "nearest",
});

Keybase proof

I hereby claim:

  • I am raghav4 on github.
  • I am raghavsharma (https://keybase.io/raghavsharma) on keybase.
  • I have a public key whose fingerprint is FF40 B945 AE93 F089 7CB2 224D 08BB B638 8224 5BF0

To claim this, I am signing this object:

@raghav4
raghav4 / Count Code lines
Created May 2, 2020 06:23 — forked from amitchhajer/Count Code lines
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n
HTML
- Semantic HTML
- Event delegation
- Accessibility / ARIA
CSS
- Specificity
- Pseudo-elements
- Pseudo-selectors
- Combinators
@raghav4
raghav4 / nodepost-1.js
Created March 11, 2020 13:04 — forked from FrankGrimm/nodepost-1.js
HTTP body in node.js
var http = require('http');
http.createServer(function (req, res) {
// set up some routes
switch(req.url) {
case '/':
console.log("[501] " + req.method + " to " + req.url);
res.writeHead(501, "Not implemented", {'Content-Type': 'text/html'});
res.end('<html><head><title>501 - Not implemented</title></head><body><h1>Not implemented!</h1></body></html>');
break;
@raghav4
raghav4 / postgres-brew.md
Created February 15, 2020 05:03 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@raghav4
raghav4 / Ansicolor.md
Created February 8, 2020 07:17
Color codes for console using Ansi
@raghav4
raghav4 / consoleColors.js
Created February 8, 2020 07:13 — forked from abritinthebay/consoleColors.js
The various escape codes you can use to color output to StdOut from Node JS
// Colors reference
// You can use the following as so:
// console.log(colorCode, data);
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`);
//
// ... and so on.
export const reset = "\x1b[0m"
export const bright = "\x1b[1m"
export const dim = "\x1b[2m"
@raghav4
raghav4 / eslint_prettier_airbnb.md
Created January 23, 2020 08:18 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node