-i - ignore errors
-c - continue
-t - use video title as file name
--extract-audio - extract audio track
| """Vigenere cipher""" | |
| import string | |
| from collections import defaultdict | |
| from pprint import pprint | |
| class Vigenere(): | |
| """Vigenere class""" | |
| def __init__(self, key, message=''): | |
| self._MATRIX = self._build_matrix() |
| // Output Android Icons.jsx | |
| // 2012 Todd Linkner | |
| // License: none (public domain) | |
| // v1.0 - base file by Todd Linkner | |
| // v1.1 - added support for XXHDPI, XXXHDPI and added PNG to the file selector | |
| // | |
| // This script is for Photoshop CS6. It outputs Android icons of the | |
| // following sizes from a source PSD at least 512px x 512px | |
| // | |
| // store: |
| #!/bin/bash | |
| IN="$1" | |
| OUT="$2" | |
| PAGES=$(pdfinfo $IN | grep ^Pages: | tr -dc '0-9') | |
| non_blank() { | |
| for i in $(seq 1 $PAGES) | |
| do | |
| # more color spectrum | |
| #convert -density 46 "$IN[$((i-1))]" -define histogram:unique-colors=true -format %c histogram:info:- | wc -l | |
| if [ $(convert -density 16 "$IN[$((i-1))]" +dither -colors 8 -depth 4 -define histogram:unique-colors=true -format %c histogram:info:- | wc -l) -ne 1 ] |
| #!/usr/bin/env bash | |
| # Must be run on an Amazon Linux AMI that matches AWS Lambda's runtime | |
| # As of Nov 23, 2015, this is Amazon Linux AMI 2014.09.2 x86_64 (ami-0c682c64) | |
| # | |
| # Lambda includes ImageMagick 6.7.8-9 preinstalled, so you need to prepend PATH | |
| # with the folder containing these binaries in your Lambda function to ensure | |
| # these newer binaries are used. | |
| # | |
| # imagemagick binary will be in /var/task/imagemagick/bin/convert |
| 'use strict' | |
| const timeout = ms => new Promise(res => setTimeout(res, ms)) | |
| function convinceMe (convince) { | |
| let unixTime = Math.round(+new Date() / 1000) | |
| console.log(`Delay ${convince} at ${unixTime}`) | |
| } | |
| async function delay () { |
| gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=unencrypted.pdf -c .setpdfwrite -f encrypted.pdf |
| # A virtualenv running Python3.6 on Amazon Linux/EC2 (approximately) simulates the Python 3.6 Docker container used by Lambda | |
| # and can be used for developing/testing Python 3.6 Lambda functions | |
| # This script installs Python 3.6 on an EC2 instance running Amazon Linux and creates a virtualenv running this version of Python | |
| # This is required because Amazon Linux does not come with Python 3.6 pre-installed | |
| # and several packages available in Amazon Linux are not available in the Lambda Python 3.6 runtime | |
| # The script has been tested successfully on a t2.micro EC2 instance (Root device type: ebs; Virtualization type: hvm) | |
| # running Amazon Linux AMI 2017.03.0 (HVM), SSD Volume Type - ami-c58c1dd3 | |
| # and was developed with the help of AWS Support |
| Set env variables in travis.yml: | |
| ``` | |
| export SENTRY_AUTH_TOKEN=... | |
| export SENTRY_ORG=organization-slug | |
| ``` | |
| update_sentry.sh: | |
| ``` |
| const async = require('async'); | |
| const download = require('download'); | |
| const fs = require('fs-extra'); | |
| const RavenLambdaWrapper = require('serverless-sentry-lib'); | |
| const Raven = require('raven') | |
| // Wrap handler for automated error and exception logging | |
| const ravenConfig = { | |
| filterLocal: false, | |
| captureErrors: true, // Don't log error responses from the Lambda ... |