Skip to content

Instantly share code, notes, and snippets.

View laughingclouds's full-sized avatar
:octocat:
idk

Hemant Bhandari laughingclouds

:octocat:
idk
  • Chandigarh, India
View GitHub Profile
@laughingclouds
laughingclouds / LinkedInFollowersConnections.js
Last active September 25, 2021 07:25
The code in this gist allows you to get the list of linkedin connections and followers you have.
/*
Connections
navigate to:
https://www.linkedin.com/mynetwork/invite-connect/connections/
*/
Object.values(document.getElementsByClassName("mn-connection-card__name")).map(item => item.innerText);
/*
Followers
@laughingclouds
laughingclouds / InstagramFollowersFollowing.js
Created August 24, 2021 08:19
Code related to instagram foo.
/**Work in progress**/
@laughingclouds
laughingclouds / index.html
Last active August 25, 2021 13:21
HTML code and CSS rules for a wave like animation, more animation sources given in the comments
<!-- code taken from: https://blog.hubspot.com/website/css-loading-animation -->
<!-- code pen link: https://codepen.io/Bilal1909/pen/pobgJae -->
<!-- The style rules and the div element code should be kept together.
They've been kept seperately for just cleanliness -->
<div class="center">
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
@laughingclouds
laughingclouds / Makefile
Last active October 20, 2021 21:18
Recursively remove all the files that don't have the specified extension.
# Better than the rest, a frickin' makefile!
# https://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/
CC=gcc
CFLAGS=-I.
DEPS = header_file.h
OBJ = file1.c file2.c and_so_on.c
%.o: %.c $(DEPS) # for compiling the object code
$(CC) -c -o $@ $< $(CFLAGS)
@laughingclouds
laughingclouds / letsSee.py
Created September 6, 2021 09:05
A little gist on some ML algorithm
from keras.models import load_model
from PIL import Image, ImageOps
import numpy as np
# Load the model
model = load_model('keras_model.h5')
# Create the array of the right shape to feed into the keras model
# The 'length' or number of images you can put into the array is
# determined by the first position in the shape tuple, in this case 1.
@laughingclouds
laughingclouds / Reasoning.md
Last active April 29, 2022 06:43
User defined header file example

Here, add() and printStudent() are user defined functins defined in file second.c.

We are using the functions defined in second.c in the file first.c.

For that, we use the header file new.h. It will contain declaration of add and printStudent, but the definition will be in second.c.

After defining the functions in new.h we include the header file in first.c.

@laughingclouds
laughingclouds / selfPurge.js
Created December 8, 2021 20:49
Purge all your comments from reddit
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
function clickDeleteFromSelection(selectedNode) {
for (let childNode of selectedNode.anchorNode.childNodes) {
if (childNode.innerText == "Delete") {
childNode.click();
}
}
}
@laughingclouds
laughingclouds / reverse.c
Created December 9, 2021 09:45
Reverse a string in C
#include <stdio.h>
#include <string.h>
void strrev(char *str, char *nStr) {
int len = strlen(str);
for (int i = len - 1; i >= 0; i--) {
strncat(nStr, &str[i], 1);
}
@laughingclouds
laughingclouds / pattern.go
Last active February 5, 2022 11:45
Pattern Printing In 5 languages | Go | Java | Python | Ruby | TypeScript
/*
go version go1.17 linux/amd64
RUN CODE HERE https://go.dev/play/
simply copy and paste -> click "run"
*/
package main
import (
"fmt"
"strings"
@laughingclouds
laughingclouds / AboutComponent.js
Last active July 13, 2022 17:30
Coursera React Course | Assignment 2-3 | Solution
import { Breadcrumb, BreadcrumbItem, Card, CardBody, CardHeader, Media } from 'reactstrap';
import { Link } from 'react-router-dom';
import RenderLeaders from './RenderLeaders';
export default function About(props) {
return (
<div className="container">
<div className="row">