Skip to content

Instantly share code, notes, and snippets.

@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--))
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:
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
#!/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:
class Cfg {
static final apiUrl = 'https://www.this-is-my-backend-api-site.com/api';
static final urlAuth = apiUrl+'/auth';
}
@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