Skip to content

Instantly share code, notes, and snippets.

View briankelleher's full-sized avatar
🏠
Working from home

Brian Kelleher briankelleher

🏠
Working from home
  • University of Connecticut
  • Storrs, CT
View GitHub Profile
@briankelleher
briankelleher / screenshot.sh
Created March 2, 2016 02:57
ffmpeg take screenshot
# -ss signals the position, in HH:MM:SS format.
# -i signals input video
# -vframes signals number of video frames
# -q:v signals quality, lower the number the better.
# screencap1.jpg signals output file name
ffmpeg -ss 00:00:02 -i video.mp4 -vframes 1 -q:v 2 screencap1.jpg
@briankelleher
briankelleher / dl.sh
Last active January 4, 2017 20:35
youtube-dl basic get best quality video
# input video URL first
# -f signals quality, in this case the best possible
youtube-dl https://vimeo.com/156202023 -f best
# Best Audio
youtube-dl --extract-audio --audio-format mp3 --audio-quality 0 https://www.youtube.com/watch\?v\=SYIXLx7on7w
@briankelleher
briankelleher / wp-modifydb.php
Created October 2, 2017 18:49 — forked from jcanfield/wp-modifydb.php
Serialized PHP Search and Replace
<?php
/**
*
* Safe Search and Replace on Database with Serialized Data v2.0.1
*
* This script is to solve the problem of doing database search and replace when
* developers have only gone and used the non-relational concept of serializing
* PHP arrays into single database columns. It will search for all matching
* data on the database and change it, even if it's within a serialized PHP
* array.
@briankelleher
briankelleher / db-far.php
Last active October 2, 2017 19:49 — forked from KLicheR/db-far.php
PHP script that perform a find and replace in a database dump (tested with MySQL) with adjustments of the PHP serialize founded.
#!/usr/bin/php
<?php
/**
* PHP script that perform a find and replace in a database dump (tested with
* MySQL) with adjustments of the PHP serialize founded.
*
* Don't forget to escape your "special characters":
* "a$b" -> "a\$b"
* "a"b" -> "a\"b"
* "a`b" -> "a\`b"
@briankelleher
briankelleher / videoPlayer.vue
Last active September 5, 2018 21:52
YouTube Style Autoplay Mute (Chrome UX Solution) - VueJS
// Semi-pseudo code below
<template>
<video :muted="muted"></video>
</template>
<script>
export default {
data: function() {
return {
@briankelleher
briankelleher / config.rb
Last active December 3, 2021 21:24
Default config/config.rb for Sourcery ArchiveSpace configuration
AppConfig[:plugins] = ['your-plugins', 'sourcery']
AppConfig[:sourcery_org_id] = 'your-ID-here'
AppConfig[:sourcery_endpoint] = 'https://sourcery-dev.web.app'
# Especially required if you are building outside of the docker release.
AppConfig[:session_expire_after_seconds] = -1
@briankelleher
briankelleher / docker-compose-release.yml
Created November 30, 2021 19:03
ArchiveSpace Local Plugin Development
# docker-compose -f docker-compose-release.yml build
# docker-compose -f docker-compose-release.yml up
version: '3.8'
services:
app:
container_name: as_release_app
build:
context: .
dockerfile: Dockerfile