Skip to content

Instantly share code, notes, and snippets.

View eshack94's full-sized avatar
🔧

Elijah Shackelford eshack94

🔧
View GitHub Profile
@eshack94
eshack94 / 00_README
Created May 3, 2018 03:03 — forked from dogeared/00_README
Extracting / Exporting custom emoji from Slack
This builds off the excellent work of @lmarkus.
The scripts below can be used in conjunction with the Slack Emoji Tools Google Chrome extension to export emojis from
one Slack team and import into another team.
Original work here: https://gist.github.com/lmarkus/8722f56baf8c47045621
@eshack94
eshack94 / 00_README
Created May 3, 2018 03:03 — forked from dogeared/00_README
Extracting / Exporting custom emoji from Slack
This builds off the excellent work of @lmarkus.
The scripts below can be used in conjunction with the Slack Emoji Tools Google Chrome extension to export emojis from
one Slack team and import into another team.
Original work here: https://gist.github.com/lmarkus/8722f56baf8c47045621
@eshack94
eshack94 / 00_README
Created July 24, 2018 09:50 — forked from thisisrachelramos/00_README
Extracting / Exporting custom emoji from Slack
This builds off the excellent work of @lmarkus.
The scripts below can be used in conjunction with the Neutral Face Emoji Tools Google Chrome extension to (bulk!)
export emojis from one Slack team and import into another team:
https://chrome.google.com/webstore/detail/neutral-face-emoji-tools/anchoacphlfbdomdlomnbbfhcmcdmjej
Original work here: https://gist.github.com/lmarkus/8722f56baf8c47045621
Steps:
1) Run js in dev tools
@eshack94
eshack94 / Install NVIDIA Driver and CUDA.md
Created August 11, 2018 02:14 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@eshack94
eshack94 / hevc_nvenc
Created October 10, 2018 00:20 — forked from nico-lab/hevc_nvenc.txt
ffmpeg -h encoder=hevc_nvenc
Encoder hevc_nvenc [NVIDIA NVENC hevc encoder]:
General capabilities: delay
Threading capabilities: none
Supported pixel formats: yuv420p nv12 p010le yuv444p yuv444p16le bgr0 rgb0 cuda d3d11
hevc_nvenc AVOptions:
-preset <int> E..V.... Set the encoding preset (from 0 to 11) (default medium)
default E..V....
slow E..V.... hq 2 passes
medium E..V.... hq 1 pass
fast E..V.... hp 1 pass
@eshack94
eshack94 / ffmpeg-hevc-encode-nvenc.md
Created October 10, 2018 00:20
This gist shows you how to encode specifically to HEVC with ffmpeg's NVENC on supported hardware, with an optional CUVID-based hardware-accelerated decoder.

Encoding high-quality HEVC content with FFmpeg - based NVENC encoder on supported hardware:

If you've built ffmpeg as instructed here on Linux and the ffmpeg binary is in your path, you can do fast HEVC encodes as shown below, using NVIDIA's NPP's libraries to vastly speed up the process.

Now, to do a simple NVENC encode in 1080p, (that will even work for Maxwell Gen 2 (GM200x) series), start with:

ffmpeg  -i <inputfile>  \
-filter:v scale_npp=w=1920:h=1080:format=nv12:interp_algo=lanczos \

-c:v hevc_nvenc -profile main -preset slow -rc vbr_hq \

@eshack94
eshack94 / docker-cleanup.groovy
Created October 26, 2018 15:30 — forked from rcbop/docker-cleanup.groovy
Jenkins pipeline script for Docker cleanup (remove dangling images and exited containers) in a given build agent
node("${params.BUILD_AGENT}") {
stage('Dangling Containers') {
sh 'docker ps -q -f status=exited | xargs --no-run-if-empty docker rm'
}
stage('Dangling Images') {
sh 'docker images -q -f dangling=true | xargs --no-run-if-empty docker rmi'
}
@eshack94
eshack94 / cleanup_docker.sh
Created October 26, 2018 15:30 — forked from ralphtheninja/cleanup_docker.sh
Cleanup and reset docker on Jenkins workers / slaves
#!/bin/bash
# This script should be located on each Jenkins slave, and the jenkins user should have permission to run it with sudo
# Attempts to cleanly stop and remove all containers, volumes and images.
docker ps -q | xargs --no-run-if-empty docker stop
docker ps -q -a | xargs --no-run-if-empty docker rm --force --volumes
docker volume ls -q | xargs --no-run-if-empty docker volume rm
docker images -a -q | xargs --no-run-if-empty docker rmi -f
# Stops the docker service, unmounts all docker-related mounts, removes the entire docker directory, and starts docker again.
@eshack94
eshack94 / bash-cheatsheet.sh
Created November 6, 2018 18:42 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@eshack94
eshack94 / pyvenvex.py
Created November 9, 2018 21:56 — forked from vsajip/pyvenvex.py
A script which demonstrates how to extend Python 3.3's EnvBuilder, by installing setuptools and pip in created venvs. This functionality is not provided as an integral part of Python 3.3 because, while setuptools and pip are very popular, they are third-party packages. The script needs Python 3.3 or later; invoke it using "python pyvenvex.py -h"…
#
# Copyright (C) 2013 Vinay Sajip. New BSD License.
#
import os
import os.path
from subprocess import Popen, PIPE
import sys
from threading import Thread
from urllib.parse import urlparse
from urllib.request import urlretrieve