Skip to content

Instantly share code, notes, and snippets.

View jishanshaikh4's full-sized avatar
🌿

Jishan Shaikh jishanshaikh4

🌿
View GitHub Profile
@jishanshaikh4
jishanshaikh4 / minOfTwo.cpp
Created August 19, 2018 05:09
First nonusable sample gist to check how it actually works
/* Code snippet to compute minimum of two numbers in cpp
*/
#include <bits/stdc++.h>
using namespace std;
int main(){
int a, b;
cin >> a >> b;
@jishanshaikh4
jishanshaikh4 / runners.cpp
Created September 17, 2018 20:23
Code for three runners time and position.
#include <bits/stdc++.h>
using namespace std;
char prevrun1, prevrun2, prevrun3;
string run1, run2, run3;
int time1, time2, time3;
int prevtime1, prevtime2, prevtime3;
void formatt(int time){
@jishanshaikh4
jishanshaikh4 / index.html
Last active December 30, 2018 19:15
Personal Website Redesign in progress...
<link href='https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700|Open+Sans:400,600,300,700' rel='stylesheet' type='text/css'>
<header>
<nav role='navigation'>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Clients</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">Blog</a></li>
@jishanshaikh4
jishanshaikh4 / activity.json
Created January 29, 2019 10:05
username: jishanshaikh4 @ lichess.org, Activity since 29/01/2019
[{"interval":{"start":1548720000,"end":1548806400},"games":{"blitz":{"win":5,"loss":4,"draw":2,"rp":{"before":1444,"after":1452}}},"follows":{"out":{"ids":["rebeccaharris"]}}},{"interval":{"start":1548633600,"end":1548720000},"games":{"blitz":{"win":5,"loss":3,"draw":1,"rp":{"before":1452,"after":1444}},"bullet":{"win":1,"loss":4,"draw":0,"rp":{"before":1408,"after":1385}}}},{"interval":{"start":1548547200,"end":1548633600},"games":{"blitz":{"win":17,"loss":15,"draw":5,"rp":{"before":1431,"after":1452}},"bullet":{"win":3,"loss":12,"draw":0,"rp":{"before":1501,"after":1408}}}},{"interval":{"start":1548460800,"end":1548547200},"games":{"bullet":{"win":2,"loss":11,"draw":0,"rp":{"before":1501,"after":1501}}}},{"interval":{"start":1548374400,"end":1548460800},"games":{"bullet":{"win":4,"loss":5,"draw":0,"rp":{"before":1512,"after":1501}},"blitz":{"win":3,"loss":0,"draw":0,"rp":{"before":1399,"after":1431}}}},{"interval":{"start":1548288000,"end":1548374400},"games":{"blitz":{"win":18,"loss":11,"draw":0,"rp":{"bef
@jishanshaikh4
jishanshaikh4 / docker.sh
Created February 4, 2019 15:59
How to install docker in Kali linux?
#!/bin/bash Taken from https://gist.github.com/nikallass/e5124756d0e2bdcf8981827f3ed40bcc
# update apt-get
export DEBIAN_FRONTEND="noninteractive"
sudo apt-get update
# remove previously installed Docker
sudo apt-get remove docker docker-engine docker.io* lxc-docker*
# install dependencies 4 cert
![](https://camo.githubusercontent.com/f550284bb57a285832dc8d5b2bbb3d8fa6fc1b1f/68747470733a2f2f6d656469612e67697068792e636f6d2f6d656469612f76464b716e43644c504e4f4b632f67697068792e676966)
@jishanshaikh4
jishanshaikh4 / spotify.desktop
Created December 1, 2021 17:31
Desktop application file for Spotify (Ubuntu)
[Desktop Entry]
Type=Application
Name=Spotify Pro
GenericName=Music Player
Icon=spotify-client
TryExec=spotify
Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
@jishanshaikh4
jishanshaikh4 / spot_no_ads.sh
Created December 1, 2021 17:41
Install Spotify for Linux (Ubuntu/Debian based distro) WITHOUT ADS
#!bin/bash
####################################################################################
# INSTALL S P O T I F Y ON LINUX (WITHOUT ADS)
# Estimated download size 500-600 MB
# How to execute this script?
@jishanshaikh4
jishanshaikh4 / install_docker.sh
Created December 2, 2021 03:34
How to install docker in Ubuntu (Tested on 21.10)?
#!bin/bash
#########################################################
BASH SCRIPT TO INSTALL DOCKER ENGINE ON LINUX (UBUNTU)
Note: There might be some yes/no interactive prompts in the terminal.
#########################################################
@jishanshaikh4
jishanshaikh4 / fake_thumbnail.sh
Created January 28, 2022 13:11
Generate fake thumbnail for an image
# Execute as ./fake_thumbnail.sh hiddenimage.png wantedthumbnail.png output.png
high="$1" # High image (full-size original view)
low="$2" # Low image (thumbnail) (should be the same size)
output="output.png"
[ ! -z "$3" ] && output="$3" # Output image
size=$(convert "$high" -format "%wx%h" info:)
convert "$high" -alpha off +level 3.5%,100% -gamma 20 high_gamma.png
low_gamma="-alpha off -gamma 0.8 +level 0%,77%"
convert \( "$low" $low_gamma \) high_gamma.png \