Skip to content

Instantly share code, notes, and snippets.

View protrolium's full-sized avatar

Ꮹανiη Ꮐaмвoα protrolium

View GitHub Profile
@protrolium
protrolium / say -v
Last active August 29, 2015 13:56
terminal say -v arguments
Female Voices
$ say -v Agnes "hello world"
$ say -v Kathy "hello world"
$ say -v Princess "hello world"
$ say -v Vicki "hello world"
$ say -v Victoria "hello world"
Male Voices
@protrolium
protrolium / YouTube API — getting video thumbnail
Created February 5, 2014 19:57
YouTube API — getting video thumbnail
Each YouTube video has 4 generated images. They are predictably formatted as follows:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
@protrolium
protrolium / youtube-dl.md
Last active December 24, 2023 19:08
youtube-dl syntax

youtube-dl will output in the current directory

To list available formats

youtube-dl --list-formats URL

To download an entire user/channel

youtube-dl -citw ytuser:<USER> or

@protrolium
protrolium / open-source-lesson.md
Last active August 29, 2015 14:21
open-source + productivity tools
@protrolium
protrolium / ffmpeg.md
Last active November 12, 2024 21:27
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with:

@protrolium
protrolium / wget.md
Last active March 8, 2024 01:46
wget commands

Download Only Certain File Types Using wget -r -A

You can use this under following situations:

  • Download all images from a website
  • Download all videos from a website
  • Download all PDF files from a website

$ wget -r -A.pdf http://url-to-webpage-with-pdfs/

@protrolium
protrolium / colorsync-filters.md
Created June 12, 2015 05:39
ColorSync Utility to shrink PDF with custom filters from Preview Quartz Filter

ColorSync Utility to shrink PDF with custom filters from Preview Quartz Filter

Create new filter in ColorSync, saved in:
/User/[username]/Library/Filters/
copy to
/Library/PDFServices

@protrolium
protrolium / build-caffe.md
Last active August 23, 2017 00:05 — forked from kylemcdonald/build-caffe.md
How to build Caffe for OS X.

Theory of Building Caffe on OS X

(with addendums, tangents, and other follies)

Introduction

I have followed Kyle McDonald's Theory of Building Caffe after what could be described as some careless brew updates and obliviousness to the conflicts between various versions of OS X, CUDA, CUDA drivers, CuDNN, and Caffe itself. I am replicating Kyle's steps here and adding a few more which were unique to my case and may not necessarily work for everyone. The goal is to run python -c "import caffe" without crashing.

Official Caffe OS X Installation Guide

http://caffe.berkeleyvision.org/install_osx.html

@protrolium
protrolium / deepdreamExamples.md
Created December 17, 2015 21:32
_=deepdream examples
layer_list = [
"conv1/7x7_s2",
"pool1/3x3_s2",
"pool1/norm1",
"conv2/3x3_reduce",
"conv2/3x3",
"conv2/norm2",
"pool2/3x3_s2",
"inception_3a/1x1",
@protrolium
protrolium / rsync.md
Last active December 24, 2023 19:05
rsync methods

using rsync

$ rsync -avE --progress /source/ /destination

  • -v --verbose
  • -a --archive (preserve all attributes)
  • -n --dry-run
  • -E, --executability (preserve executability)
  • --delete This tells rsync to delete extraneous files from the receiving side (files that aren't on the sending side), but only for the directories that are being synchronized.