Skip to content

Instantly share code, notes, and snippets.

ffmpeg -f dshow -i video="USB2.0 0.3M UVC WebCam" -ss 00:00:2.000 -f image2 -vframes 1 out.png
module Jekyll
# Base class for the tag pages with all the shared behaviour
class BaseTagPage < Page
def initialize(site, base, dir)
@site = site
@base = base
@dir = dir
@name = 'index.html'
self.process @name
self.read_yaml File.join(base, '_layouts'), layout_page
---
layout: page
footer: false
navbar: Archives
---
<ul>{% for tag in site.tags %}
<li><a href="/tag/{{ tag[0] }}">{{ tag[0] }}</a> <span>{{ tag[1].size }}</span></li>{% endfor %}
</ul>
---
layout: page
footer: false
navbar: Archives
---
<div id="blog-archives" class="category">
{% for post in site.tags[page.tag] %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% unless year == this_year %}
<section class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><span class="glyphicon glyphicon-tags"></span>&nbsp;&nbsp;Tags</h3>
</div>
<div style="padding: 5px;">
<ul class="nav nav-pills">
{% for category in site.tags %}
{% capture tag_url %}{{ site.tag_dir }}/{{ category | first | slugize | downcase | replace:' ','-' | append:'/index.html'}}{% endcapture %}
<li {% if tag_url == page.url %}class='active'{% endif %}>
{% capture tag-size %}{{ category | last | size }}{% endcapture %}
{% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %}
{% unless category == '0' %}
<span class="glyphicon glyphicon-folder-open"></span>&nbsp;
<span class="categories">
{% if post %}
{{ post.categories | category_links }}
{% else %}
{{ page.categories | category_links }}
{% endif %}
</span>
Configuration configuration = new Configuration();
configuration.setUseGrammar(true);
configuration.setGrammarName("necessarily");
configuration.setGrammarPath("/Development/Sphinx/grammar");
configuration.setAcousticModelPath("file:///Development/Sphinx/wsj-en-us");
configuration.setDictionaryPath("file:///Development/Sphinx/dict/cmuphonemedict");
/*
* FFmpegMediaPlayer: A unified interface for playing audio files and streams.
*
* Copyright 2014 William Seemann
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
for line in `docker ps | awk '{print $1}' | grep -v CONTAINER`; do docker ps | grep $line | awk '{printf $NF" "}' && echo $(( `cat /sys/fs/cgroup/memory/docker/$line*/memory.usage_in_bytes` / 1024 / 1024 ))MB ; done
kubectl exec --namespace=manadr-dev -it $(kubectl get pod -l "service=mysql" --namespace=manadr-dev -o jsonpath='{.items[0].metadata.name}') -- bash