Skip to content

Instantly share code, notes, and snippets.

@jaggzh
jaggzh / README.md
Created December 30, 2019 23:22 — forked from mrbar42/README.md
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
class Cfg {
static final apiUrl = 'https://www.this-is-my-backend-api-site.com/api';
static final urlAuth = apiUrl+'/auth';
}
#!/bin/bash
# Simple script to do a command upon voice-recognition of.. a command.
# It uses pocketsphinx_continuous (which comes from debian's
# pocketsphinx package in my case).
# For accuracy, similar phrases should be provided.
# The LAST phrase on the commandline will trigger the command
# (which is the very last thing on the command line)
# Example:
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
OPTS=-Wall
CFLAGS=-I/usr/include/cairo ${OPTS}
LDLIBS=$(shell pkg-config x11 --libs) -lXfixes -lcairo -lXcomposite -lXext
all: cc
cc:
g++ -o draw-border ${CFLAGS} draw-border.c ${LDLIBS} && ./draw-border
vi:
@jaggzh
jaggzh / readcountdown.sh
Last active January 15, 2022 10:10
Bash function for a prompt with visible seconds countdown
# See video: https://youtu.be/5z0JImIiQVs
readcountdown1 is a function
readcountdown1 ()
{
local secs="$1";
local var="$2";
local msg="$3";
local uinp;
for ((i=secs; i>0; i--))
#!/usr/bin/perl
# gist url: https://gist.github.com/jaggzh/f004a9917c2cb50ec2e10d24ed925dcd
# Processes CSV output from an amazon-buddy command
# About:
# Originally I wrote this for cost/pill for supplements.
# In its present state it's modified for finding syringes,
# evaluating with the regexes for "2 pack" "5ct" etc.
package bansi;
# Gist url: https://gist.github.com/7b22252263719757e17ca710ac091110
use strict; use warnings;
use Exporter 'import';
our @codes = qw(
$bgbla $bgred $bggre $bgbro
$bgblu $bgmag $bgcya $bggra
$bla $red $gre $bro
#!/usr/bin/perl
# Outputs a 24-bit color (r,g,b) table of resistor information
# (Requires a terminal supporting 24 bit colors)
# https://gist.github.com/7928e4f3797b421a68fbffd780018727
# jaggz.h over at gmail
use Text::Table;
use utf8;
my $tb = Text::Table->new(qw/Color Digit Multiplier Tolerance/);
$tb->load(
position.position asin position.page thumbnail amazonChoice price.savings_amount title price.currency bestSeller score price.savings_percent sponsored price.before_price reviews.rating price.current_price position.global_position price.discounted reviews.total_reviews url amazonPrime
4 [ 1]  0.04 16.99 480ct BOJACK 37 Values 480 Pcs Electronics Component Fun Kit with Power Supply Module, Jumper Wire,Precision Potentiometer,830 t... B099MQV8ZW https://www.amazon.com/dp/B099MQV8ZW
4 [ 2]  0.04 12.79 300ct Hilitchi 15 Value 300pcs Variable Resistor Assorted Kit B01CV9P23C https://www.amazon.com/dp/B01CV9P23C
4 [ 3]  0.06 16.99 300ct Raogoodcx Variable Resistor Assorted Kit 15 Value 300pcs Potentiometer Kit B07ZX2CB6B https://www.amazon.com/dp/B07ZX2CB6B
4 [ 4]  0.06 17.99 300ct Sponsored Ad - BOJACK 15 Values 300 pcs 100 Ohm- 2M Ohm Variable Resistor 6mm Pot