Skip to content

Instantly share code, notes, and snippets.

View supermasita's full-sized avatar
🤘
Calambre de trueno

Supermasita supermasita

🤘
Calambre de trueno
View GitHub Profile
@supermasita
supermasita / gist:1890a7bab928e5508c12b20aed7e61c8
Created August 6, 2021 21:38
NGINX - Search for a string in cache files
# NGINX - Search for a string in cache files
# In this case, "0_rlng9eks" would be the ID of a video, which is passed in a request.
[root@server ~]# grep -ERl -m 1 "0_rlng9eks" /var/cache/nginx-vod/*
/var/cache/nginx-vod/c/8b/9af44fb9d8e8d337569e2087140ed8bc
/var/cache/nginx-vod/e/98/3f7a94cb5ce07b1995cbcd7da39fa98e
[root@server ~]#
@supermasita
supermasita / view-your-product-key-in-windows.vbs
Created January 24, 2018 10:37
How to view your product key in Windows 10, Windows 8 and Windows 7
' https://winaero.com/blog/how-to-view-your-product-key-in-windows-10-windows-8-and-windows-7/
' How to view your product key in Windows 10, Windows 8 and Windows 7
Option Explicit
Dim objshell,path,DigitalID, Result
Set objshell = CreateObject("WScript.Shell")
'Set registry key path
Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\"
'Registry key value
@supermasita
supermasita / README.md
Created November 28, 2017 02:54 — 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

Keybase proof

I hereby claim:

  • I am supermasita on github.
  • I am supermasita (https://keybase.io/supermasita) on keybase.
  • I have a public key whose fingerprint is CF35 F2ED 74BC 544F AE36 C662 05D1 D32F 8D4C 5FD5

To claim this, I am signing this object:

@supermasita
supermasita / gist:044ebe06954fe04d2653c13290b4c2b5
Created September 29, 2016 17:56
FFMPEG - Mux two videos into side by side rendition
ffmpeg -i happy01.mp4 -i happy02.mp4 -strict -2 -filter_complex "[0:v:0]pad=iw*2:ih[bg]; [bg][1:v:0]overlay=w" happy03.mp4
@supermasita
supermasita / kaltura-basic_session_and_list.py
Created September 25, 2016 21:20
Kaltura - Basic session and media list with Python
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Kaltura API
Very basic example of how to start a session on Python get a list of entries
Should print something like
export HISTTIMEFORMAT='%Y-%m-%d %H:%M.%S | '
or add to .bashrc
# http://stackoverflow.com/questions/9548755/powerpoint-ppt-to-jpg-or-png-image-conversion-using-php#16045442
## Dependencies
apt-get install unoconv
apt-get install imagemagick
## First converts your presentation to PDF
unoconv -f pdf presentation.ppt
## Then convert your PDF to jpg
convert presentation.pdf presentation_%03d.jpg
@supermasita
supermasita / gist:da2c43501287a13d03b8069f6a3ae3a2
Created May 24, 2016 13:44
FIND + AWK - Find files older than N days and sum their total disk use
# seen on http://www.liamdelahunty.com/tips/linux_ls_awk_totals.php
# gives result in MB
find /opt/kaltura/dwh/cycles/process/ -type f -mtime +3 -exec ls -l {} \; | awk '{ SUM += $5} END { print SUM/1024/1024 }'
@supermasita
supermasita / ffmpeg-trim.txt
Last active May 19, 2016 18:22
FFMPEG or AVCONV - Example to trim (shorten) video without transcoding
# Valid for FFMPEG or AVCONV
# "-ss" : start
# "-t" : end
avconv -i input.flv -ss 00:00:00 -t 00:10:00 -c copy output.flv