Skip to content

Instantly share code, notes, and snippets.

bluesmilery /
Last active May 23, 2021 05:36
[create_virtual_env] Used to create a Anaconda virtual environment for CUDA and TensorFlow. If you want to use this shell script, please read the blog.
# Used to create a Anaconda virtual environment for CUDA and TensorFlow.
# If you want to use this shell script, please read the blog.
echo ""
echo "This script is used to create a Anaconda virtual environment for CUDA and TensorFlow."
echo ""
read -p "Enter the name of Anaconda virtual environment: " ENV_NAME
snowwalf /
Last active April 16, 2019 14:38

How to install dlib v19.9 or newer (w/ python bindings) from github on macOS and Ubuntu


  • Have Python 3 installed. On macOS, this could be installed from homebrew or even via standard Python 3.6 downloaded installer from On Linux, just use your package manager.
  • On macOS:
    • Install XCode from the Mac App Store (or install the XCode command line utils).
    • Have homebrew installed
  • On Linux:
jamesmacwhite /
Last active November 17, 2023 15:24
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

# download MS COCO dataset
# ref:
echo "Downloading..."
wget && \
zhang2333 / [译]Visual Studio Code文档其1—基本使用.md
Last active March 8, 2017 14:23
[译]Visual Studio Code文档其1—基本使用
View [译]Visual Studio Code文档其1—基本使用.md

#Visual Studio Code的基本使用 全文翻译自[官方Docs][1]

Visual Studio Code的核心是一个代码编辑器。像许多其他代码编辑器一样,VS Code采用了普遍的UI设计,将显示所有可访问的文件及文件夹的目录树置于左侧,并将文件内容编辑器置于右侧。下面本篇将描述VS Code的几个独特之处。

译者注:NodeJS方面VS Code是Sublime很好的替代品,不妨试试

##文件与Project VS Code以文件、文件夹为基础——你可以通过VS Code打开文件夹来立即启动project。

VS Code可以读写不同框架或平台中不同类型的文件。即便你的VS Code同时打开了package.jsonproject.jsontsconfig.json甚至ASP.NET 5 Visual Studio的项目文件,VS Code仍然可以读取它们并为你提供相应的附加功能,如[IntelliSense][2]。

danackerson / 100_base.conf
Last active October 20, 2023 10:11
using nginx + lua + redis for redirects and rewrites
View 100_base.conf
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty
# more info @
http {
lua_package_path "/etc/nginx/include.d/?.lua;;";
lua_socket_pool_size 100;
lua_socket_connect_timeout 10ms;
lua_socket_read_timeout 10ms;
server {
arunoda / gist:7790979
Last active November 30, 2023 09:39
Installing SSHPass
View gist:7790979

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

dashed / github-pandoc.css
Created September 26, 2013 13:42
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
View github-pandoc.css
/*! normalize.css v2.1.3 | MIT License | */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
* Correct `block` display not defined in IE 8/9.
shijinkui / gist:5132586
Created March 11, 2013 07:41
View gist:5132586
$0 获取当前执行的shell脚本的文件名
$n 获取当前执行的shell脚本的第n个参数值,n=1..9
$* 获取当前shell的所有参数 “$1 $2 $3 …注意与$#的区别
$# 获取当前shell命令行中参数的总个数