This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .app-container pre[class*="language-"] { | |
| border: 1px solid; | |
| } | |
| *[class*="language-note"]::first-line { | |
| font-weight: bold; | |
| } | |
| .app-container pre[class*="language-"] code[class*="language-"] { | |
| color: black; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import pandas as pd | |
| # To install the dependencies, run "pip install pandas requests" on a terminal | |
| # Tested and working with Python 3.6 on Windows 10, Mac OS Catalina and Manjaro 20.2 | |
| content = "\n".join(pd.read_clipboard().columns) | |
| url = "YOR WEBHOOK URL HERE" # Webhook url, from server settings here: https://i.imgur.com/f9XnAew.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import discord | |
| from discord.ext import commands | |
| from discord.ext.commands import CommandNotFound | |
| from discord_config import CMD_PREFIX, DESCRIPTION, TOKEN | |
| # You need to have a discord_config.py | |
| # TOKEN = "" # The token you got when you created a new bot | |
| # CMD_PREFIX = "$" # The command prefix (e.g. so you can call $command_name) | |
| # DESCRIPTION = "" # The description (optional) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import urllib.parse | |
| from collections import OrderedDict | |
| """ | |
| This function will programatically generate a URL for carbon.now.sh to create | |
| pretty code images, you can customize any of the props in code here, instead of | |
| having to load the site, then load a json file, then paste the code. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from selenium import webdriver | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.common.keys import Keys | |
| # Paths may change over time. Last time tested, 2020-03-04 | |
| def login(): | |
| options = webdriver.ChromeOptions() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Requires xclip installed. Simply copy the following line to "Command" field and check any filetype in "Appearance Conditions" | |
| echo -n %f | xclip -selection clipboard |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Requires ffmpeg installed. Place this into "Command" field, choose an icon and filetype and voilà! | |
| bash -c 'ffmpeg -i "$0" -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p "${0%%.*}_whatsapp".mp4' %f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # OCR image copied to clipboard into terminal | |
| # Requires tesseract, xclip and imagemagick installed | |
| clipboard_img_path="/tmp/out.png" | |
| output_img_path="/tmp/gray_out.png" | |
| temp_txt_path="/tmp/ocr" | |
| xclip -se c -t image/png -o > $clipboard_img_path | |
| convert -colorspace gray -fill white -resize 300% -sharpen 0x1 $clipboard_img_path $output_img_path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| This script will read a list of timestamps and return the sum of them. | |
| Example file: | |
| ``` | |
| 01:00 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bash -c 'ffmpeg -i "$0" -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p "${0%%.*}".mp4' %f |
NewerOlder