Skip to content

Instantly share code, notes, and snippets.

@Minionguyjpro
Minionguyjpro / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Last active September 22, 2024 11:12
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

WATCH OUT FOR SUSPICIOUS LINKS IN THE COMMENTS BELOW!

I noticed that people or bots are trying to place suspicious links below that link to some sketchy source for what they say is a 'crack' or nothing at all. I'd recommend you to NOT click on any of those links! The scripts in this guide are open source and can be viewed as desired. I'm fine with posting coupons here! Do note that if you do so, please prove it! Link a review site along with the site and the coupon. Thanks, Minionguyjpro.

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that

@OlivierLDff
OlivierLDff / Readme.md
Last active April 14, 2024 09:19
🚀 Git Bash Emojis (Windows)

Open git bash with admin privilege.

cd "C:/Program Files/Git/usr/share/mintty"
mkdir -p emojis
cd emojis
curl https://raw.githubusercontent.com/wiki/mintty/mintty/getemojis > getemojis
./getemojis -d
import unittest
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
import time
from datetime import datetime
@zapisnicar
zapisnicar / telegram_bot.md
Last active September 13, 2024 09:31
How to create Telegram bot and send messages to group

How to create Telegram Bot and send messages to your group

  1. Create Telegram bot:

    Search for user @BotFather in Telegram app. Type /help in BotFather chat and wait for the reply. Type in the chat:

    /newbot

or select /newbot command from Help text. Answer few setup questions:

@BhanukaUOM
BhanukaUOM / convert_ts_to_mp4.py
Last active September 14, 2023 12:50
Convert all ts videos to mp4
import moviepy.editor as moviepy
import glob, os
files = []
for file in glob.glob('*.ts'):
files.append(file)
for file in glob.glob('**/*.ts'):
files.append(file)
for file in glob.glob('**/**/*.ts'):
files.append(file)
@shakes76
shakes76 / profiles.json
Last active September 17, 2022 01:16
Windows Terminal Profiles (Ubuntu Solarised Dark, WinPython 3.6 Cascadia Code)
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"profiles":
@bradyjiang
bradyjiang / cleaner.py
Created July 21, 2019 15:47
Solution 1: lxml.html.clean.Cleaner
from lxml.html.clean import Cleaner
#to prevent Cleaner to replace html with div, leave page_structure alone: http://stackoverflow.com/questions/15556391/lxml-clean-html-replaces-html-tag-with-div
cleaner = Cleaner(page_structure=False)
#according to: http://stackoverflow.com/questions/8554035/remove-all-javascript-tags-and-style-tags-from-html-with-python-and-the-lxml-mod
#Cleaner is a better general solution to the problem than using strip_elements, because in cases like this you want to strip out more than just the <script> tag; you also want to get rid of things like onclick=function() attributes on other tags.
cleaner.javascript=True
cleaner.scripts=True
#turn this on in the future if necessary
#cleaner.style=True
@Bilio
Bilio / clean_html.py
Created July 17, 2018 01:02
Clean html with python lxml.html Cleaner
import codecs
import sys
from lxml import etree
from lxml.html.clean import Cleaner
def sanitize(dirty_html):
cleaner = Cleaner(page_structure=True,
meta=True,
@bashkirtsevich
bashkirtsevich / export-import.md
Created April 15, 2017 11:00
MongoDB export full database

For lazy people like me, i use mongodump it's faster:

mongodump -d <database_name> -o <directory_backup>

And to "restore/import" that, i used (from directory_backup/dump/):

mongorestore -d <database_name> <directory_backup>

With this solution, you don't need to each all collections and export one by one. Just specify the database. I would recommend against using mongodump/mongorestore for big data storages. It is very slow and once you get past 10/20GB of data it can take hours to restore.

@gwax
gwax / data_paths.md
Last active April 20, 2023 12:11
handling data file paths in python

A couple pointers for dealing with files on the filesystem from inside python:

  1. don't modify sys.path
  2. don't use relative paths unless they are relative to something
  3. always use os.path.join
  4. don't rely on the environment

Now for a pattern that I strong suggest:

Start with a code tree where your files are set aside but inside your code tree: