Skip to content

Instantly share code, notes, and snippets.

View wolfy-j's full-sized avatar

Anton Tsitou wolfy-j

View GitHub Profile
@wolfy-j
wolfy-j / video2gif.lua
Last active May 9, 2018 17:09
Converts video file to GIF.
--@Description: Converts video file to GIF.
--@Version: 1.2 <May 9, 2018>
--@Source: https://gist.github.com/wolfy-j/d4ece481eb8c9bd8a438967d77603ce7
--@Author: Wolfy-J <wolfy.jd@gmail.com>
--@From: https://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality
-- Input and output files
local input = ask("Input File", "exists")
local output = ask("Output File", "!empty")
@wolfy-j
wolfy-j / copy.lua
Last active May 5, 2018 15:44
Copy media content from one container to another
--@Description: Copy media content from one container to another
--@Version: 1.0 <Apr 22, 2018>
--@Source: https://gist.github.com/wolfy-j/8009a8b3be1004d933e105494c64c372
--@Author: Wolfy-J <wolfy.jd@gmail.com>
local input = ask("Source file", "exists")
local output = ask("Output file", "!empty")
if input == "" or output == "" then
print("\n<red>Script error: </reset><red+hb>not enough arguments</reset>\n")
@wolfy-j
wolfy-j / golang-tls.md
Created November 20, 2017 13:34 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@wolfy-j
wolfy-j / Makefile
Created September 5, 2017 13:43 — forked from turtlemonvh/Makefile
Golang Project Makefile Template
# Borrowed from:
# https://github.com/silven/go-example/blob/master/Makefile
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/
BINARY = superdo
VET_REPORT = vet.report
TEST_REPORT = tests.xml
GOARCH = amd64
VERSION?=?
nano /lib/systemd/system/gearman-job-server.service && systemctl daemon-reload && service gearman-job-server restart && service gearman-job-server status
@wolfy-j
wolfy-j / gist:ec88836ad324d071c3bdc5a5ca639545
Created February 20, 2017 20:49
X Windows system principle
Do not add new functionality unless an implementor cannot complete a real application without it.
It is as important to decide what a system is not as to decide what it is. Do not serve all the world's needs; rather, make the system extensible so that additional needs can be met in an upwardly compatible fashion.
The only thing worse than generalizing from one example is generalizing from no examples at all.
If a problem is not completely understood, it is probably best to provide no solution at all.
If you can get 90 percent of the desired effect for 10 percent of the work, use the simpler solution. (See also worse is better.)
Isolate complexity as much as possible.
Provide mechanism rather than policy. In particular, place user interface policy in the clients' hands.
@wolfy-j
wolfy-j / crontab
Created February 1, 2017 11:54 — forked from Systerr/crontab
Backup
# Execute :crontab -e
# add folow lines (create backup at 4-30 o'clock every day):
30 04 * * * /root/mysql-dump.sh