Skip to content

Instantly share code, notes, and snippets.

@zeqk
zeqk / flv2mp4
Last active August 9, 2019 14:45
## Convertir FLV en MP4
```bash
$ ffmpeg -i video.flv -vcodec copy -strict -2 video.mp4
```
Batch
```bash
for i in *.flv;
@zeqk
zeqk / nginx.conf
Created March 27, 2019 13:43 — forked from jrom/nginx.conf
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";

Notes

Delete remote branch

git push origin --delete the_remote_branch

Batch get size

for D in *; do [ -d "${D}" ] && cd ${D} && pwd && (git count-objects -v) && cd .. && echo _______________ ; done 
git reset --hard origin/{branch}
using System;
using Microsoft.Extensions.Logging;
public class TimedLogger<T>: ILogger<T>
{
private readonly ILogger _logger;
public TimedLogger(ILogger logger) => _logger = logger;
public TimedLogger(ILoggerFactory loggerFactory): this(new Logger<T>(loggerFactory)) { }
<proxy enabled="true" reverseRewriteHostInResponseHeaders="false" />
@zeqk
zeqk / nginxproxy.md
Created July 26, 2018 23:22 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

sudo docker run -d -p 8080:3000 -e "[email protected]" -v ~/wiki-config.yml:/var/wiki/config.yml --restart always --name wikijs --link wikijs-mongodb --add-host grafana.osperyh.org.ar:172... requarks/wiki
docker run -d -p 27017:27017 -v ~/wikijs_mongo_data:/data/db --restart always --name wikijs-mongodb mongo
@zeqk
zeqk / docker-cleanup-resources.md
Created July 20, 2018 13:33 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm