from subprocess import Popen, PIPE
def copy_clipboard(msg):
''' Copy `msg` to the clipboard '''
with Popen(['xclip','-selection', 'clipboard'], stdin=PIPE) as pipe:
pipe.communicate(input=msg.encode('utf-8'))
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
https://www.honor.com/cn/laptops/honor-magicbook-x14-plus/ | |
https://www.bilibili.com/video/BV1or421u7Wj/ |
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 | |
# sudo apt-get install ffmpeg | |
# if ffmpeg is not installed, install it | |
if ! [ -x "$(command -v ffmpeg)" ]; then | |
sudo apt-get install ffmpeg | |
fi | |
# if no arguments are given, print usage |
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 ruby | |
require 'wwmd' | |
require 'example_mixins' | |
include WWMD | |
puts "Traversal Fuzzer made by Outlasted\n Greetz to .:TeaMp0isoN:." | |
opts = { :base_url => "http://www.example.com" } | |
page = Page.new(opts) | |
spider = page.spider ; | |
spider.set_ignore([ /logout/i, /login/i ]) ; | |
while (url = spider.next) ; |
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
# Define here the models for your spider middleware | |
# | |
# See documentation in: | |
# https://docs.scrapy.org/en/latest/topics/spider-middleware.html | |
import sys | |
import time | |
import logging | |
from scrapy import signals | |
from scrapy.mail import MailSender | |
from scrapy.utils.project import get_project_settings |
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 asyncio | |
import json | |
from pathlib import Path | |
from typing import Sequence | |
import aiohttp | |
BOT_TOKEN = "" | |
CHAT_ID = 1234 |
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
package main | |
import ( | |
"net/http" | |
"os" | |
"bytes" | |
"path" | |
"path/filepath" | |
"mime/multipart" | |
"io" |
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
uBlock origin extension | |
add the following lines to "my filters": | |
! hide www.twitch.tv extensions | |
www.twitch.tv##.extension-view__iframe | |
www.twitch.tv##.extensions-video-overlay-size-container | |
www.twitch.tv##.extensions-dock__layout |
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
function uuid() { | |
var uuid = "", i, random; | |
for (i = 0; i < 32; i++) { | |
random = Math.random() * 16 | 0; | |
if (i == 8 || i == 12 || i == 16 || i == 20) { | |
uuid += "-" | |
} | |
uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16); | |
} |
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 __future__ import print_function | |
import platform | |
import sys | |
import threading | |
import time | |
class UnsyncedBankAccount(object): | |
"""Bank account with no synchronization lock, prone to race condition.""" |
NewerOlder