Skip to content

Instantly share code, notes, and snippets.

View rrjanbiah's full-sized avatar

R. Rajesh Jeba Anbiah rrjanbiah

View GitHub Profile
@devadvance
devadvance / part_video_to_gif.sh
Created February 28, 2021 03:10
Create animated GIF and WebP from videos using ffmpeg
ffmpeg -ss $INPUT_START_TIME -t $LENGTH -i $INPUT_FILENAME \
-vf "fps=$OUTPUT_FPS,scale=$OUTPUT_WIDTH:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" \
-loop $NUMBER_OF_LOOPS $OUTPUT_FILENAME
# Change these placeholders:
# * $INPUT_START_TIME - number of seconds in the input video to start from.
# * $LENGTH - number of seconds to convert from the input video.
# * $INPUT_FILENAME - path to the input video.
# * $OUTPUT_FPS - ouput frames per second. Start with `10`.
# * $OUTPUT_WIDTH - output width in pixels. Aspect ratio is maintained.
@miguelmota
miguelmota / instructions.sh
Last active March 20, 2023 19:55
Fire TV Stick 4K use USB drive as storage
# install adb shell apk using downloader
# open adb shell
# list usb drivers and their ids
$ sm list-disks
disk:8,0
# partiion all of usb to be used as internal storage
$ sm partition disk:8,0 private
Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
<!DOCTYPE html>
<html>
<body>
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.2.3-v2/dist/dbr.js"
data-productKeys="PRODUCT-KEY"></script>
<input id="uploadImage" type="file" accept="image/bmp,image/jpeg,image/png,image/gif">
<p id="results"></p>

This is probably going to be the next iteration of the declarative CRUD metamodel that powers Hyperfiddle. It's just a design sketch, the current metamodel in prod is different. Hyperfiddle is an easy way to make a CRUD app. Hyperfiddle is based on Datomic, a simple graph database with the goal of "enabling declarative data programming in applications."

CRUD UI definition

This extends Datomic pull syntax into something that composes in richer ways. The key idea is that Pull notation expresses implicit joins and thus can be used to declare data dependencies implicitly, without needing to name them. We also handle tempids, named transactions, and hyperlinks to other pages. We satisfy the hypermedia constraint, like HTML and the web.

{identity                                                   ; Pass through URL params to query
 [{:dustingetz/event-registration                           ; virtual attribute identif

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@jakub-g
jakub-g / async-defer-module.md
Last active May 6, 2024 16:18
async scripts, defer scripts, module scripts: explainer, comparison, and gotchas

<script> async, defer, async defer, module, nomodule, src, inline - the cheat sheet

With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.

This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.

If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!

Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)

@jpsoroulas
jpsoroulas / debezium-installation.adoc
Last active March 29, 2024 15:46
Debezium installation procedure for PostgreSQL without docker

Debezium installation

@emwalker
emwalker / setup.md
Last active February 27, 2021 07:06
Geting set up with Cayley and Postgres (April 2018)

Getting set up with Cayley and Postgres (April 2018)

Initialize the database

$ createdb testdb
$ wget https://github.com/cayleygraph/cayley/releases/download/v0.7.2/cayley_0.7.2_darwin_amd64.tar.gz
$ tar zxvf cayley_0.7.2_darwin_amd64.tar.gz
$ cat >cayley.cfg.json
{
  "store": {
@t0mgerman
t0mgerman / install-guide.md
Last active March 10, 2023 17:59
Installing Restyaboard on Windows Server / IIS

Installing Restyaboard on Windows

Tested with:

  • Windows Server 2008 R2
  • IIS 7.5
  • PHP 5.6
  • PostgreSQL 10