mkdir ~/picture-in-pictures/
/bin/bash -c 'youtube-dl --ignore-errors --yes-playlist -o "${HOME}/./picture-in-picture/%(playlist_id)s-%(playlist_index)s" `xclip -selection c -o`'
start a player instance
<VirtualHost *:80> | |
# ServerName localhost | |
DocumentRoot /var/www/app/current/public | |
<Directory /var/www/app/current/public> | |
# This relaxes Apache security settings. | |
AllowOverride all | |
# MultiViews must be turned off. | |
Options -MultiViews | |
# Uncomment this if you're on Apache >= 2.4: | |
Require all granted |
# See /usr/share/postfix/main.cf.dist for a commented, more complete version | |
# Debian specific: Specifying a file name will cause the first | |
# line of that file to be used as the name. The Debian default | |
# is /etc/mailname. | |
# myorigin = /etc/mailname | |
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) | |
biff = no |
require 'fileutils' | |
require 'pathname' | |
require 'mini_exiftool' | |
# ---------------------------------------------------------------------------------------------- | |
source_root = "/tmp/source" | |
output_root = "/tmp/dest" | |
exts = "JPG,ORF" | |
# ---------------------------------------------------------------------------------------------- |
#!/bin/bash | |
INPUT=$1 | |
PAT="^([0-9]+|([0-9]+).([0-9]+))([GgMmKk])?$" | |
if [[ ! $INPUT =~ $PAT ]]; then | |
echo "error: bad format" | |
exit 1 | |
fi |
// A Rust macro for unpacking a vector to a tuple of options | |
// Original from https://stackoverflow.com/questions/29504873/unpack-a-take-iterator-into-a-tuple/43967765#43967765 | |
macro_rules! tuplet { | |
{ ($y:ident $(, $x:ident)*) = $v:expr } => { | |
let ($y,$($x),*, _) = tuplet!($v ; 1 ; ($($x),*) ; ($v.get(0)) ); }; | |
{ ($y:ident , * $x:ident) = $v:expr } => { | |
let ($y,$x) = tuplet!($v ; 1 ; () ; ($v.get(0)) ); }; | |
{ ($y:ident $(, $x:ident)* , * $z:ident) = $v:expr } => { | |
let ($y,$($x),*, $z) = tuplet!($v ; 1 ; ($($x),*) ; ($v.get(0)) ); }; |
require 'spec_helper' | |
RSpec.describe "jruby bug", type: :request do | |
# Creates a ruby module to namespace all the classes in if required | |
def register_module(module_name) | |
# dynamically create nested modules | |
module_names = module_name.split("::").inject([]) { |n, c| n << (n.empty? ? [c] : [n.last] + [c]).flatten } | |
puts "module_names: #{module_names}" | |
module_names.map do |module_name_array| |
mkdir ~/picture-in-pictures/
/bin/bash -c 'youtube-dl --ignore-errors --yes-playlist -o "${HOME}/./picture-in-picture/%(playlist_id)s-%(playlist_index)s" `xclip -selection c -o`'
start a player instance
const TreeNode = function (value) { | |
this.left = null | |
this.right = null | |
this.value = value | |
} | |
// accept muliple sorted unqiue numbers arrays | |
const buildTreeNodes = function (...arrs) { | |
let node = new TreeNode() | |
for (let i = 0; i < arrs.length; i++) { |
<VirtualHost *.:443> | |
ServerName whatever-domain.com | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
SSLProxyEngine on | |
ProxyPreserveHost on | |
RewriteEngine On |
[program:whoami] | |
command=/bin/bash -l -c 'echo "whoami: $(whoami)"' | |
stdout_logfile=/dev/stdout | |
startsecs = 0 | |
autorestart = false |