Skip to content

Instantly share code, notes, and snippets.

@vaibhaw
vaibhaw / cloneall.sh
Created August 20, 2021 22:37 — forked from potter0815/cloneall.sh
clone all private repos of an organization
#!/bin/bash
#requires jq -> http://stedolan.github.io/jq/
#optional change working_dir
working_dir=${1-$(pwd)}
cd $working_dir
user="github_username"
token="application token"
organization="Organization_Name"
@vaibhaw
vaibhaw / gmail-github-filters.md
Created July 29, 2021 18:19 — forked from ldez/gmail-github-filters.md
Gmail and GitHub - Filters

Gmail and GitHub

Create new filters and create new labels.

Pull Request

from:(notifications@github.com) AND {"Patch Links" "approved this pull request." "requested changes on this pull request." "commented on this pull request." "pushed 1 commit." "pushed 2 commits." "pushed 3 commits."}

label: gh-pull-request

@vaibhaw
vaibhaw / rclone.sh
Last active July 9, 2020 22:06
rclone commands
# exclude a directory
rclone sync src_dir g_storage:dest_dir -v --exclude "/SomeFolder/**" --dry-run
# sync vs copy
# sync is destructive whereas copy is not. sync will remove extra files on destination
# limit http transactions
rsync --tpslimit 10 copy src_dir dest_dir
# print progress
@vaibhaw
vaibhaw / 1-setup.md
Created October 22, 2019 19:31 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.

@vaibhaw
vaibhaw / TensorFlow_Windows.md
Created January 30, 2018 16:15 — forked from ericjang/TensorFlow_Windows.md
Setting up TensorFlow on Windows using Docker.

TensorFlow development environment on Windows using Docker

Here are instructions to set up TensorFlow dev environment on Docker if you are running Windows, and configure it so that you can access Jupyter Notebook from within the VM + edit files in your text editor of choice on your Windows machine.

Installation

First, install https://www.docker.com/docker-toolbox

Since this is Windows, creating the Docker group "docker" is not necessary.

@vaibhaw
vaibhaw / install_ffmpeg_ubuntu.sh
Created May 6, 2017 11:02 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
## get total number of frames in a video
# source: http://stackoverflow.com/q/2017843/925216
ffprobe -v error -count_frames -select_streams v:0 \
-show_entries stream=nb_read_frames -of default=nokey=1:noprint_wrappers=1 \
input.mkv
## split files into 5 seconds
# source: http://superuser.com/q/377343/307710
ffmpeg -ss 00:00:00 -t 00:00:05 -i input.mp4 -acodec copy -vcodec copy output.mp4
# bash script - http://grapsus.net/blog/post/A-script-for-splitting-videos-using-ffmpeg
@vaibhaw
vaibhaw / gcc-update-alternatives.sh
Created October 15, 2016 14:41
Update Alternatives
# source: http://askubuntu.com/a/26518/258167
x=4.8 # priority = 10
y=5 # priority = 20
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo update-alternatives --install /usr/bin/gcc gcc "/usr/bin/gcc-${x}" 10
sudo update-alternatives --install /usr/bin/gcc gcc "/usr/bin/gcc-${y}" 20
@vaibhaw
vaibhaw / ubuntu_cmds.sh
Created October 15, 2016 12:47
Ubuntu Tips and Tricks
NO_PUBKEY <key>
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <key>
@vaibhaw
vaibhaw / setup_vatic.md
Created October 5, 2016 00:45
Setup Vatic, Turkic

Updated Vatic repo: https://github.com/johndoherty/vatic

put following in /etc/apache2/sites-enabled/000-default.conf

WSGIDaemonProcess www-data
WSGIProcessGroup www-data
<VirtualHost *:80>
        ServerName aws_host_ip
 # ServerAdmin webmaster@localhost