Cheatsheet for image / video metadata manipulation.
Last updated 2019-07-24
until more specific license...
THE CONTENT BELOW IS PROVIDED "AS-IS",
WE DISCLAIM LIABILITY FOR ALL USES TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW.
// Source: https://www.carlrippon.com/fetch-with-async-await-and-typescript/ | |
// Source: https://eckertalex.dev/blog/typescript-fetch-wrapper | |
interface HttpResponse<T> extends Response { | |
parsedBody?: T; | |
error?: T; | |
} | |
export async function http<T>(request: RequestInfo): Promise<HttpResponse<T>> { | |
const response: HttpResponse<T> = await fetch(request); |
use deadpool_postgres::tokio_postgres::NoTls; | |
use deadpool_postgres::{Config, ManagerConfig, Pool, PoolError, RecyclingMethod}; | |
use once_cell::sync::Lazy; | |
use std::sync::Arc; | |
static DB_POOL: Lazy<Arc<Pool>> = Lazy::new(|| { | |
let mut cfg = Config::new(); | |
cfg.dbname = Some( | |
std::env::var("DATABASE_URL") | |
.map_err(|_| String::from("Environment variable Database URL could not be read")) |
# frozen_string_literal: true | |
require 'rails_helper' | |
RSpec.configure do |config| | |
config.use_transactional_fixtures = false | |
# DatabaseCleaner settings | |
config.before(:suite) do | |
DatabaseCleaner.clean_with(:truncation) |
''' | |
Title: SSHtranger Things | |
Author: Mark E. Haase <mhaase@hyperiongray.com> | |
Homepage: https://www.hyperiongray.com | |
Date: 2019-01-17 | |
CVE: CVE-2019-6111, CVE-2019-6110 | |
Advisory: https://sintonen.fi/advisories/scp-client-multiple-vulnerabilities.txt | |
Tested on: Ubuntu 18.04.1 LTS, OpenSSH client 7.6p1 | |
We have nicknamed this "SSHtranger Things" because the bug is so old it could be |
# inside a rails console | |
Sidekiq.redis { |conn| conn.flushdb } |
// Kotlin + HttpURLConnection | |
val connection = URL("https://api.github.com/user").openConnection() as HttpURLConnection | |
val auth = Base64.getEncoder().encode("user:pass".toByteArray()).toString(Charsets.UTF_8) | |
connection.addRequestProperty("Authorization", "Basic $auth") | |
connection.connect() | |
println(connection.responseCode) | |
println(connection.getHeaderField("Content-Type")) | |
val text = connection.inputStream.use { it.reader().use { reader -> reader.readText() } } | |
println(text) |
Last updated: 2017-03-18
exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .
###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs