Skip to content

Instantly share code, notes, and snippets.

@ragnraok
ragnraok / iframe-probe.py
Created September 9, 2019 07:24 — forked from alastairmccormack/iframe-probe.py
Shows GOP structure for video file using ffmpeg --show-frames output
#!/usr/bin/env python
#
# Shows GOP structure of video file. Useful for checking suitability for HLS and DASH packaging.
# Example:
#
# $ iframe-probe.py myvideo.mp4
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
@alxlion
alxlion / gist:2881c29649bc5d477954f79b3071e408
Last active March 11, 2019 15:00
Figure component Hugo/NetlifyCMS
CMS.registerEditorComponent({
// Internal id of the component
id: "figure",
// Visible label
label: "Figure",
// Fields the user need to fill out when adding an instance of the component
fields: [
{name: 'src', label: 'Image', widget: 'image'},
{name: 'caption', label: 'Caption', widget: 'string'},
{name: 'link', label: 'Link', widget: 'string'},
@laacz
laacz / binarlauks.html
Created January 31, 2018 08:48
HTML koda sagatave, kura pasargā visus no binārlauka negatīvās enerģijas nelabvēlīgās ietekmes.
<!doctype html>
<head>
<!--
Šis pasargā no binārlauka negatīvās enerģijas nelabvēlīgās ietekmes.
Sīkāk: https://www.facebook.com/CUBESystems/videos/vb.158748300855954/1694637707266998/?type=2&theater
&
@@@@
@@@@
% @@@@
@GoodMirek
GoodMirek / rabbitmq2cloudwatch
Last active January 28, 2020 09:03
Bash script sending RabbitMQ metrics to AWS CloudWatch
#! /bin/bash
# This script reads rabbitmq statistics and report them as CloudWatch metrics.
# Author: Mirek Svoboda
# Version: 0.3
# TABSTOP=4
#
# Changelog:
# 0.3
# -- increasing number of AWS CLI calls from 3 to 5. We have added RabbitMQ queues and then hit a limit of 20 datapoints.
#
@davidfurlong
davidfurlong / JSON.stringify-replacer-sort-keys.js
Last active June 16, 2024 09:41
JSON.stringify replacer function for having object keys sorted in output (supports deeply nested objects)
// Spec http://www.ecma-international.org/ecma-262/6.0/#sec-json.stringify
const replacer = (key, value) =>
value instanceof Object && !(value instanceof Array) ?
Object.keys(value)
.sort()
.reduce((sorted, key) => {
sorted[key] = value[key];
return sorted
}, {}) :
value;
@laacz
laacz / namedays-extended.json
Last active January 10, 2024 06:44
Vārdadienas JSON (par prieku Sergejam)
{
"01-01": ["Afra", "Afrodīte", "Agunda", "Agurs", "Januārija", "Laimstars", "Soleda", "Solita", "Solveta"],
"01-02": ["Induls", "Īva", "Ivaise", "Ivija", "Īvija", "Ivika", "Īvis", "Ivisa", "Ivs"],
"01-03": ["Ambrozijs", "Ammonārija", "Ammunārija", "Mežvaldis", "Mieriņš", "Miermīlis", "Miernesis", "Miervalds", "Ringla", "Ringo", "Rinolds"],
"01-04": ["Amina", "Amīna", "Amirans", "Amirs", "Blāzma", "Ilveta", "Ilvis", "Spodrīte"],
"01-05": ["Amrita", "Amunds", "Anarita", "Saimona", "Saimons", "Seimanis", "Semions", "Semjons", "Simeons", "Simions", "Zintauts", "Zinturs"],
"01-06": ["Arams", "Aranta", "Arfa", "Arnīda", "Arnija", "Arnika"],
"01-07": ["Julians", "Jūlians", "Jūliāns", "Sigmars", "Sigmārs", "Zigmāra", "Zigmāris", "Zigmars"],
"01-08": ["Ants", "Aristarhs", "Aristida", "Aristīda", "Aristids", "Aristīds", "Aristons", "Aristrīds", "Arjana", "Arlands", "Arleta", "Arlēna", "Arlijs", "Arlita", "Gatiņš", "Īvande", "Ivanna", "Ivase", "Ivena"],
"01-09": ["Aksela", "Akselis",
Import-Module -Name D:\Temp\ACME-posh\ACMEPowerShell.psd1
$domain = "mydomain.com"
$certificiatePassword = "abcd1234"
$email = "letsencrypt@mydomain.com"
$vault = "D:\Vault\{0}\{1}" -f $domain, [guid]::NewGuid()
mkdir $vault
cd $vault
Initialize-ACMEVault -BaseURI https://acme-v01.api.letsencrypt.org/
New-ACMERegistration -Contacts mailto:$email
@gubatron
gubatron / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md
Last active March 12, 2024 07:34
How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a github.com user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

https://github.com/alice/repo1

https://github.com/alice/repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.

@omeinusch
omeinusch / create-mysql.bash
Created August 31, 2013 11:50
Simple bash script to create mysql db, user with generated password
#!/bin/bash
PASS=`pwgen -s 40 1`
mysql -uroot <<MYSQL_SCRIPT
CREATE DATABASE $1;
CREATE USER '$1'@'localhost' IDENTIFIED BY '$PASS';
GRANT ALL PRIVILEGES ON $1.* TO '$1'@'localhost';
FLUSH PRIVILEGES;
MYSQL_SCRIPT
@brittanydionigi
brittanydionigi / googlemap.html
Last active June 30, 2020 21:42
pin cities on a google map based on city name & country
<!doctype>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Google Maps - pin cities</title>
<style type="text/css">
html, body { height: 100%; margin: 0; padding: 0; }
#map_canvas { height: 100%; }
</style>