Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
| #!/usr/bin/env bash | |
| # ============================================================================= | |
| # NanoMDM — Full Stack Setup Script | |
| # Generates PKI, Docker Compose, Caddy config, and enrollment profile. | |
| # Run as a non-root user with sudo access on Ubuntu 22.04. | |
| # | |
| # Usage: | |
| # chmod +x nanomdm-setup.sh | |
| # ./nanomdm-setup.sh | |
| # |
| #It's not directly mentioned in the documentation on how to do this, so here you go. This command will tunnel everything including DNS: | |
| sshuttle --dns -vr user@yourserver.com 0/0 --ssh-cmd 'ssh -i /your/key/path.pem' |
| ############################################################################# | |
| # Original code ported from the Java reference code by Bram Cohen, April 2001, | |
| # with the following statement: | |
| # | |
| # this code is public domain, unless someone makes | |
| # an intellectual property claim against the reference | |
| # code, in which case it can be made public domain by | |
| # deleting all the comments and renaming all the variables | |
| # | |
| class Rijndael(object): |
| var nodemailer = require('nodemailer'); | |
| var sesTransport = require('nodemailer-ses-transport'); | |
| var smtpPassword = require('aws-smtp-credentials'); | |
| var mailOptions = { | |
| from: 'from@example.com', | |
| to: 'to@example.com', | |
| text: 'This is some text', | |
| html: '<b>This is some HTML</b>', | |
| attachments: [ |
| /* | |
| This script, when used with Google Apps Scripts will delete 500 emails and | |
| can be triggered to run every minute without user interaction enabling you | |
| to bulk delete email in Gmail without getting the #793 error from Gmail. | |
| Configure the search query in the code below to match the type of emails | |
| you want to delete | |
| Browser to https://script.google.com/. | |
| Start a script and paste in the code below. | |
| After you past it in, save it and click the little clock looking button. |
| # Inspired from https://medium.com/@ismailakkila/black-hat-python-encrypt-and-decrypt-with-rsa-cryptography-bd6df84d65bc | |
| # Updated to use python3 bytes and pathlib | |
| import zlib | |
| import base64 | |
| from Crypto.PublicKey import RSA | |
| from Crypto.Cipher import PKCS1_OAEP | |
| from pathlib import Path |
| # How to encrypt/decrypt your text/blob secret with AWS KMS with AWS cli | |
| KEY_ID=alias/my-key | |
| SECRET_BLOB_PATH=fileb://my-secret-blob | |
| SECRET_TEXT="my secret text" | |
| ENCRYPTED_SECRET_AS_BLOB=encrypted_secret_blob | |
| DECRYPTED_SECRET_AS_BLOB=decrypted_secret_blob # Result of decrypt-blob target | |
| encrypt-text: |
Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
| import superagentPromise from 'superagent-promise'; | |
| import _superagent from 'superagent'; | |
| const superagent = superagentPromise(_superagent, global.Promise); | |
| const API_ROOT = 'https://api.tiens.lk/v2/'; | |
| const encode = encodeURIComponent; | |
| const responseBody = res => res.body; |