Skip to content

Instantly share code, notes, and snippets.

View clotyxf's full-sized avatar
💬
What's going on?

cloty clotyxf

💬
What's going on?
View GitHub Profile
@clotyxf
clotyxf / Instructions.sh
Created May 16, 2018 06:15 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@clotyxf
clotyxf / amazon_forest_notebook.ipynb
Created June 22, 2018 07:33 — forked from EKami/amazon_forest_notebook.ipynb
Planet: Understanding the Amazon deforestation from Space challenge
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@clotyxf
clotyxf / googlenet.py
Created July 26, 2018 04:01 — forked from joelouismarino/googlenet.py
GoogLeNet in Keras
from scipy.misc import imread, imresize
from keras.layers import Input, Dense, Convolution2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D, Dropout, Flatten, merge, Reshape, Activation
from keras.models import Model
from keras.regularizers import l2
from keras.optimizers import SGD
from googlenet_custom_layers import PoolHelper,LRN
def create_googlenet(weights_path=None):
@clotyxf
clotyxf / curl.md
Created December 12, 2018 09:44 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@clotyxf
clotyxf / nginx-elasticsearch-proxy.conf
Created December 20, 2018 00:54 — forked from abrudtkuhl/nginx-elasticsearch-proxy.conf
NGINX Reverse Proxy Authentication For Elasticsearch
# Run me with:
#
# $ nginx -p /path/to/this/file/ -c nginx.conf
#
# All requests are then routed to authenticated user's index, so
#
# GET http://user:password@localhost/_search?q=*
#
# is rewritten to:
#
@clotyxf
clotyxf / nginx_groups_auth.conf
Created December 20, 2018 01:31 — forked from philwinder/nginx_groups_auth.conf
IVZ: A nginx configuration file to allow groups of users to access different parts of an elasticsearch instance.
events {
worker_connections 1024;
}
http {
upstream elasticsearch {
server 127.0.0.1:9200;
}
upstream kibana {
@clotyxf
clotyxf / ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
Created May 15, 2020 05:59 — forked from Brainiarc7/ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

@clotyxf
clotyxf / ff2cv.cpp
Created May 19, 2020 03:52 — forked from yohhoy/ff2cv.cpp
Read video frame with FFmpeg and convert to OpenCV image
/*
* Read video frame with FFmpeg and convert to OpenCV image
*
* Copyright (c) 2016 yohhoy
*/
#include <iostream>
#include <vector>
// FFmpeg
extern "C" {
#include <libavformat/avformat.h>
#!/bin/bash
# Anh Nguyen <anh.ng8@gmail.com>
# 2016-04-30
# MIT License
# This script takes in images from a folder and make a crossfade video from the images using ffmpeg.
# Make sure you have ffmpeg installed before running.
# The output command looks something like the below, but for as many images as you have in the folder.
@clotyxf
clotyxf / m3u8-to-mp4.md
Created July 1, 2020 02:47 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4