This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Apple hides old versions of stuff at https://developer.apple.com/download/more/ | |
# Install the latest XCode (8.0). | |
# We used to install the XCode Command Line Tools 7.3 here, but that would just upset the most recent versions of brew. | |
# So we're going to install all our brew dependencies first, and then downgrade the tools. You can switch back after | |
# you have installed caffe. | |
# Install CUDA toolkit 8.0 release candidate | |
# Register and download from https://developer.nvidia.com/cuda-release-candidate-download |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Refer to http://caffe.berkeleyvision.org/installation.html | |
# Contributions simplifying and improving our build system are welcome! | |
# cuDNN acceleration switch (uncomment to build with cuDNN). | |
USE_CUDNN := 1 | |
# CPU-only switch (uncomment to build without GPU support). | |
# CPU_ONLY := 1 | |
# uncomment to disable IO dependencies and corresponding data layers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Refer to http://caffe.berkeleyvision.org/installation.html | |
# Contributions simplifying and improving our build system are welcome! | |
# cuDNN acceleration switch (uncomment to build with cuDNN). | |
# USE_CUDNN := 1 | |
# CPU-only switch (uncomment to build without GPU support). | |
CPU_ONLY := 1 | |
# uncomment to disable IO dependencies and corresponding data layers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Leveldb < Formula | |
desc "Key-value storage library with ordered mapping" | |
homepage "https://github.com/google/leveldb/" | |
url "https://s3.eu-central-1.amazonaws.com/wb-rd/leveldb-1.19-macos1012fix.tar.gz" | |
sha256 "7a580e543a3b69efb4407619c48dbeac2043eccd385574f9de53f2dcfea65897" | |
option "with-test", "Verify the build with make check" | |
depends_on "gperftools" | |
depends_on "snappy" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Squared and resize the video | |
ffmpeg -i all.mp4 -vf "scale=256:256:force_original_aspect_ratio=decrease,pad=256:256:(ow-iw)/2:(oh-ih)/2" all_square.mp4 | |
#Convert video to gif | |
ffmpeg -y -i all_square.mp4 -vf fps=10,scale=256:-1:flags=lanczos,palettegen palette.png | |
ffmpeg -i all_square.mp4 -i palette.png -filter_complex "fps=10,scale=256:-1:flags=lanczos[x];[x][1:v]paletteuse" all.gif | |
#Convert gif to png | |
# ffmpeg -i all_square.mp4 -vcodec png pngs/%05d.png | |
ffmpeg -i all.gif -vcodec png pngs/%0d.png |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install brew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install the experimental NVIDIA Mac drivers | |
# Download from http://www.nvidia.com/download/driverResults.aspx/103826/en-us | |
# Install cuDNN v5 for 8.0 RC or use the latest when it's available | |
# Register and download from https://developer.nvidia.com/rdp/cudnn-download | |
# or this path: https://developer.nvidia.com/rdp/assets/cudnn-8.0-osx-x64-v5.0-ga-tgz | |
# extract to the NVIDIA CUDA folder and perform necessary linking |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#switch to docker-machine | |
eval "$(docker-machine env default)" | |
#run docker image | |
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD={{superstrong-password}}' -p 1433:1433 -d microsoft/mssql-server-linux | |
#create new docker-machine make sure docker-machine have 3.5GB of ram | |
#docker-machine create -d virtualbox --virtualbox-memory 4096 default | |
#edit default docker-machine make sure docker-machine have 3.5GB of ram |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start docker | |
stop docker | |
restart docker | |
#Docker Build | |
docker build -t rizkyario/${image-name} . | |
docker push rizkyario/${image-name} | |
docker tag ${image_id} docker.io/${login_name}/${image_name} | |
# Docker-Machine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#create new docker-machine make sure docker-machine have 3.5GB of ram | |
#docker-machine create -d virtualbox --virtualbox-memory 4096 default | |
#edit default docker-machine make sure docker-machine have 3.5GB of ram | |
docker-machine stop | |
VBoxManage modifyvm default --memory 4096 | |
docker-machine start | |
# switch to docker-machine | |
eval "$(docker-machine env default)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Add remote origin | |
git remote add origin $(github-address) | |
#Push to origin | |
git push -u origin master | |
#Create new branch | |
git checkout -b $(new-branch) | |
git push -u origin $(new-branch) |
OlderNewer