Skip to content

Instantly share code, notes, and snippets.

View aptitudepi's full-sized avatar
:octocat:

Devkumar Banerjee aptitudepi

:octocat:
View GitHub Profile
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active July 16, 2024 17:25
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@mcandre
mcandre / apple-bluetooth-keyboard-windows-10-bootcamp.md
Created June 14, 2016 18:12
How to fix Apple Bluetooth Wireless Keyboard (Windows 10)

The driver situation with Apple Bluetooth wireless keyboards and Windows 10 is horrible, even with the latest BootCamp drivers. Fortunately, a workaround is available, if you're patient.

Pair keyboard once

  1. Turn on the keyboard.
  2. Press and hold Command + w until the keyboard light begins blinking, indicating the keyboard is ready to pair.
  3. Use Windows Bluetooth settings to pair the keyboard, entering the same code (e.g. 123456 Enter) on both internal and external keyboards.

Pairing the keyboard is very trial and error. 9/10 times, Windows will complain that the keyboard is not available for pairing. Just keep trying.

@jhaddix
jhaddix / all.txt
Last active July 15, 2024 23:21
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎
@floydnoel
floydnoel / git-ignore-cleaner.sh
Last active June 29, 2024 22:56
Remove all files from a Git repo based on the .gitignore file
#!/bin/bash
echo "Cleaning up any git ignored files..."
# copy and paste the line below to get the same results as running this script
git rm --cached `git ls-files -ic --exclude-from=.gitignore`
echo "Finished clean up."
# source: https://stackoverflow.com/questions/13541615/how-to-remove-files-that-are-listed-in-the-gitignore-but-still-on-the-repositor/13541721
@bobpaw
bobpaw / checklist.md
Last active December 8, 2023 20:36
Linux Checklist for Cyberpatriot idk

Install updates (Covered)

apt-get update && apt-get upgrade && apt-get dist-upgrade

Automatic updates in GUI (Not covered)

Firewall (Covered)

apt-get install ufw && ufw enable

SSH settings

Turn off root in sshd_config (Covered)

if grep -qF 'PermitRootLogin' /etc/ssh/sshd_config; then sed -i 's/^.*PermitRootLogin.*$/PermitRootLogin no/' /etc/ssh/sshd_config; else echo 'PermitRootLogin no' >> /etc/ssh/sshd_config; fi

PermitRootLogin no

curl https://archive.md/dXdvQ/c58b55674ef876f8b78d02c30a685561b6376981.png --output 01.png && \
curl https://archive.md/dXdvQ/4591a5caa74058c0ae18d71b5cc40ea41a6ea496.png --output 02.png; \
convert -depth 8 01.png rgb:ytdl01.part; \
convert -depth 8 02.png rgb:ytdl02.part; \
cat ytdl01.part ytdl02.part > youtube-dl2020.09.20.tar.gz; \
rm ytdl01.part ytdl02.part; \
clear; \
print 'sha256 checksum: \n'; \
sha256sum youtube-dl2020.09.20.tar.gz
@gasman
gasman / encode.py
Created October 25, 2020 12:23
Encoding a file as a Youtube video - https://www.youtube.com/watch?v=hyqLv2_zBdA
# Encode inputfile.tar.gz as a series of video frames
# Frames are written to frames/frameNNNN.png
from PIL import Image
with open('inputfile.tar.gz', 'rb') as f:
data = f.read()
WIDTH = 120
HEIGHT = 90
CHUNK_SIZE = int((WIDTH * HEIGHT) / 8)
@aptitudepi
aptitudepi / diseaseprediction.ipynb
Created July 16, 2021 15:21
DiseasePrediction
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kkrypt0nn
kkrypt0nn / ansi-colors-discord.md
Last active July 9, 2024 17:13
A guide to ANSI on Discord

A guide to ANSI on Discord

Discord is now slowly rolling out the ability to send colored messages within code blocks. It uses the ANSI color codes, so if you've tried to print colored text in your terminal or console with Python or other languages then it will be easy for you.

Quick Explanation

To be able to send a colored text, you need to use the ansi language for your code block and provide a prefix of this format before writing your text:

\u001b[{format};{color}m

\u001b is the unicode escape for ESCAPE/ESC, meant to be used in the source of your bot (see ). If you wish to send colored text without using your bot you need to copy the character from the website.

@aptitudepi
aptitudepi / checklist.md
Last active September 24, 2023 04:18 — forked from bobpaw/checklist.md
Linux Checklist for Cyberpatriot idk

Install updates (Covered)

apt-get update && apt-get upgrade && apt-get dist-upgrade

Automatic updates in GUI (Not covered)

Firewall (Covered)

apt-get install ufw && ufw enable

SSH settings

Turn off root in sshd_config (Covered)

if grep -qF 'PermitRootLogin' /etc/ssh/sshd_config; then sed -i 's/^.*PermitRootLogin.*$/PermitRootLogin no/' /etc/ssh/sshd_config; else echo 'PermitRootLogin no' >> /etc/ssh/sshd_config; fi

PermitRootLogin no