Skip to content

Instantly share code, notes, and snippets.

View KarelWintersky's full-sized avatar

Karel Wintersky KarelWintersky

View GitHub Profile
@richardwellerson
richardwellerson / goAccessGuide.md
Last active September 21, 2021 21:09
GoAccess Installation

GoAccess Guide Install

I've tried so much times install GoAccess. For this reason, i create this gist to make your job easy.

Don't skip the steps:

Install GeoIP Lib

$ sudo su
# cd /usr/local/src
@johnjohndoe
johnjohndoe / ffmpeg-scale-video.md
Last active August 5, 2024 10:11
Resize / scale a video with FFmpeg

Resize / scale a video with FFmpeg

  • Scale the input.mp4 to a height of 600px.
  • Let FFmpeg choose a number which is divisible by 2 to avoid the not divisible by 2 error.
ffmpeg -i input.mp4 -vf scale=-2:600,setsar=1 ouput.mp4

Related

@ridvanaltun
ridvanaltun / SCAN_CORRUPTED_VIDEOS.md
Last active August 17, 2024 04:59
How to check if a video file is corrupted?

Download ffmpeg from here, download *-win64-gpl.zip for Windows.

Install ffmpeg for Ubuntu

sudo apt install ffmpeg

Below command will give you a log file. If no error found, the log file will be empty.

@KarelWintersky
KarelWintersky / mysql_dbu_create.sh
Created October 2, 2020 13:53
MySQL -- create user & database + password
#!/usr/bin/env bash
#
# Script to create MySQL db + user
#
# @author Karel Wintersky <karel.wintersky@gmail.com>
# @version 0.2
# mysql_config_editor set --login-path=proftpd --host=localhost --user=proftpd --password
@ttscoff
ttscoff / logr.bash
Last active April 16, 2022 23:59
Bash logging utility that simplifies use of logger command
#!/bin/bash
# Logging utility that simplifies user of bash logger command
# # First source the script
# source ~/scripts/logr.bash
# # Start the logger, generates log name from scripts filename
# logr start
# # or define your own
# logr start LOG_NAME
@Pulimet
Pulimet / AdbCommands
Last active September 20, 2024 06:31
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@ssokolow
ssokolow / firefox_migration.rst
Last active February 26, 2024 04:35
Disaster Plans for Firefox XUL Sunset

Disaster Plans for Firefox XUL Sunset

Public URL:Github Gist
Status: Incomplete
Last Updated:2018-08-23 04:10 EDT

Threat Summary

@irazasyed
irazasyed / weight-utility.php
Created January 8, 2016 09:21
PHP: Utility function for getting random values with weighting.
<?php
/**
* getRandomWeightedElement()
* Utility function for getting random values with weighting.
* Pass in an associative array, such as array('A'=>5, 'B'=>45, 'C'=>50)
* An array like this means that "A" has a 5% chance of being selected, "B" 45%, and "C" 50%.
* The return value is the array key, A, B, or C in this case. Note that the values assigned
* do not have to be percentages. The values are simply relative to each other. If one value
* weight was 2, and the other weight of 1, the value with the weight of 2 has about a 66%
* chance of being selected. Also note that weights should be integers.
@kissarat
kissarat / descend.sql
Created June 16, 2015 01:30
MySQL. Gets all descendants (children) for given ID of parent with depth parameter
DROP PROCEDURE IF EXISTS descend;
CREATE PROCEDURE descend(uid INT, depth INT) BEGIN
DROP TABLE IF EXISTS descendants;
DROP TABLE IF EXISTS children;
CREATE TEMPORARY TABLE descendants (
id int,
parent_id int,
level int
) ENGINE = MEMORY;
INSERT INTO descendants(id, level)
@protrolium
protrolium / ffmpeg.md
Last active September 2, 2024 06:56
ffmpeg guide

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

You can get the list of installed codecs with: