Skip to content

Instantly share code, notes, and snippets.

View k4mrul's full-sized avatar
😎
Keep smiling ;)

Abdul Hannan Kamrul k4mrul

😎
Keep smiling ;)
View GitHub Profile
@joulgs
joulgs / terminal.txt
Last active April 24, 2024 14:24
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active April 24, 2024 06:35
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@ayyybe
ayyybe / ccdl.command
Last active April 9, 2024 09:04
Adobe Offline Package Builder v0.1.2 (macOS only) --- No longer being maintained.
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@glof2
glof2 / spacepaper.pyw
Last active July 4, 2020 21:52
Sets your wallpaper to NASA's picture of the day
import requests
from bs4 import BeautifulSoup
from os import path, getcwd
import ctypes
import time
def windowswallpaper(image):
SPI_SETDESKWALLPAPER = 20
ctypes.windll.user32.SystemParametersInfoW(SPI_SETDESKWALLPAPER, 0, image, 0)
@vishnuhd
vishnuhd / mysql-client-k8s.md
Created August 22, 2019 13:21
mysql-client in Kubernetes to test your connection to mysql server

mysql-client in Kubernetes to test your connection to mysql server

kubectl run mysql-client --image=mysql:5.7 -it --rm --restart=Never -- /bin/bash

mysql -h mysql-service -uroot -proot_password -e 'SHOW databases;'

OR

mysql -h mysql-service -uroot -proot_password

@mmathys
mmathys / vimeo-vod.md
Last active December 13, 2023 19:19
Download Vimeo VOD (video on demand)

How to download vimeo VOD for offline usage

Variant 1

Use youtube-dl directly to download the video (thanks @meepybub!) Example:

youtube-dl -u <youremailaddress@example.com> "https://vimeo.com/ondemand/<video>"
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@debonx
debonx / php.ini
Last active December 13, 2021 23:04
Optimal php.ini configuration for Wordpress, see also https://xilab.co/what-are-the-best-wordpress-php-ini-settings/
# Wordpress php.ini configuration
upload_max_filesize = 32M
post_max_size = 32M
memory_limit = 128M
max_execution_time = 60
max_input_vars = 10000
max_input_time = 30
@efernandesng
efernandesng / reset_teamviewer.sh
Last active January 9, 2024 19:38
Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13
#!/bin/bash
##
# Remove "Commercial use suspected"/"Commercial use detected" warning on teamviewer 13
#
# Tested on Arch linux
##
CONFIG_FILE=/opt/teamviewer/config/global.conf
@chdsbd
chdsbd / slack-dnd.md
Created September 16, 2018 04:15
Disable Slack notifications for the weekend

Disable Slack notifications for the weekend

There isn't a way to configure DND for the weekend on Slack. However, you can use the /dnd 24 hours command to disable notifications for 24 hours using the [undocumented API][api] and [legacy tokens][token]. We're going to use the undocumented api and IFTTT to automate this.

Steps

  1. Generate a [token] for your account
  2. Navigate to your personal DM and copy the url (e.g. DAYM93S0N from acme.slack.com/messages/DAYM93S0N/convo/GBG661YR2-1536698414.000100/)
  3. Update the following url with your information (TOKEN looks like xoxp-4030334043-4959593942-3030320302032-sdf23rfasdf23rsf and CHANNEL looks like DAYM93S0N)
    https://slack.com/api/chat.command?token=xoxp-4030334043-4959593942-3030320302032-sdf23rfasdf23rsf&channel=DAYM93S0N&command=%2Fdnd&text=24%20hours