Skip to content

Instantly share code, notes, and snippets.

View sc0rp10n-py's full-sized avatar
😎

Pragyan sc0rp10n-py

😎
View GitHub Profile
@rajesh-s
rajesh-s / gem5_on_wsl2.md
Last active September 5, 2022 18:29
Installing gem5 simulator on Windows WSL2 (Windows Subsystem for Linux 2)

Installing gem5 simulator on Windows WSL2

  1. Install WSL2 using PowerShell (Assuming you are on 2004 build else check this
  dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  wsl --set-default-version 2
  1. Install distro, terminal from Microsoft App store
@nonchris
nonchris / discord-custom-help-command.py
Last active January 2, 2024 19:32
A kinda advanced custom "help" command for your Discord.py bots!
import discord
from discord.ext import commands
from discord.errors import Forbidden
"""This custom help command is a perfect replacement for the default one on any Discord Bot written in Discord.py!
However, you must put "bot.remove_command('help')" in your bot, and the command must be in a cog for it to work.
Original concept by Jared Newsom (AKA Jared M.F.)
[Deleted] https://gist.github.com/StudioMFTechnologies/ad41bfd32b2379ccffe90b0e34128b8b
Rewritten and optimized by github.com/nonchris
@jjsquady
jjsquady / nextjs-deploy.md
Last active April 16, 2024 11:07
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@hakluke
hakluke / openinbrowser.py
Created May 18, 2019 15:38
Little Python script to open a list of URLs from a file in browser tabs, n tabs at a time
#! /usr/bin/python3
import webbrowser, sys
if len(sys.argv) < 3:
print("Usage: openinbrowser.py ./urls.txt 20")
quit()
f = open(sys.argv[1])
tabs = int(sys.argv[2])
counter = 1
@victornpb
victornpb / deleteDiscordMessages.js
Last active April 16, 2024 09:32
Delete all your messages from DM or Channel in Discord
/*
This file is now hosted here:
https://github.com/victornpb/undiscord
*/
@zubaer-ahammed
zubaer-ahammed / Reset MySQL Root Password in Mac OS.md
Last active April 4, 2024 10:38
Reset MySQL Root Password in Mac OS

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@kocisov
kocisov / next_nginx.md
Last active April 10, 2024 14:27
How to setup next.js app on nginx with letsencrypt
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active April 16, 2024 16:01
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@maxpoletaev
maxpoletaev / youtube_migrate.py
Last active July 31, 2021 16:52
Transfer YouTube subscriptions to another account
"""
Automatic migration of subscriptions to another
YouTube account with Python and Selenium.
Tested with:
- selenium 3.0
- firefox 49.0
- python 3.5
1. Install selenium from pypi: