brew install nmap
nmap --script ssl-enum-ciphers -p 443 example.server.com
Starting Nmap 7.40 ( https://nmap.org ) at 2017-05-18 15:34 CEST
Nmap scan report for example.server.com (1.2.3.4)
Host is up (0.036s latency).
# Requirements: | |
# pip install pdf2image pytesseract Pillow | |
# | |
import os | |
import glob | |
import sys | |
import pytesseract | |
from pdf2image import convert_from_path | |
from PIL import Image |
import Foundation | |
// needed for Linux | |
#if canImport(FoundationNetworking) | |
import FoundationNetworking | |
#endif | |
// New async await URLSession extensions are available solely on Apple platform | |
// so this polyfill it's necessary, otherwise the code does not compile on Linux | |
extension URLSession { |
#!/bin/bash -e | |
# Re-Encode Mp4 Video Files using H.264 and AAC audio, optimized for streaming | |
# Credits: https://superuser.com/a/1551095 | |
# -c:v libx264 selects the video encoder libx264, which is a H.264 encoder. | |
# -preset slow selects the slow x264 encoding preset. Default preset is medium. Use the slowest preset that you have patience for. | |
# -crf 20 selects a CRF value of 20 which will result in a high quality output. Default value is 23. A lower value is a higher quality. Use the highest value that gives an acceptable quality. | |
# -c:a aac selects the audio encoder aac, which is the built-in FFmpeg AAC encoder. | |
# -b:a 160k encodes the audio with a bitrate of 160k. | |
# -vf format=yuv420p chooses YUV 4:2:0 chroma-subsampling which is recommended for H.264 compatibility. |
import android.os.SystemClock | |
import android.view.View | |
/** | |
* Implements the "throttle first" mechanism for click listeners, to prevent double taps. | |
* | |
* How it works: | |
* - Define a sampling window time (default: 500ms) | |
* - when you click at time T0, the first click gets dispatched and the subsequent ones happening | |
* between T0 and T0 + WindowTime gets ignored |
#!/usr/bin/env python3 | |
import os | |
import re | |
import pathlib | |
import ffmpeg | |
import time | |
files = pathlib.Path('.').glob('*.mp4') | |
files = sorted(files, key=lambda x: float(re.findall("(\d+)", os.path.basename(x))[0])) |
#!/bin/bash -e | |
# Extract Key Frames from a video and print timestamp on each frame (works with ffmpeg version 5.1.2) | |
# | |
# Credits: | |
# - https://jdhao.github.io/2021/12/25/ffmpeg-extract-key-frame-video/ | |
# - https://superuser.com/questions/575854/can-ffmpeg-extract-images-from-a-video-with-timestamps | |
# | |
# First parameter: input video | |
# Second parameter: output directory | |
# Example ./extract-key-frames myvideo.mp4 outdir/ |
import Foundation | |
extension Sequence where Element: Hashable { | |
func uniqued() -> [Element] { | |
var set = Set<Element>() | |
return filter { set.insert($0).inserted } | |
} | |
} | |
public extension StringProtocol { |