Skip to content

Instantly share code, notes, and snippets.


Nick Herro ncherro

Block or report user

Report or block ncherro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ncherro /
Created Jun 4, 2018
Pull fresh docker images
# pull fresh docker images
# docker images with and production|master|latest
images=$(docker images | grep '' | grep 'production\|master\|latest' | awk '{print $1":"$2}')
# loop through images and pull each one
for image in $images
ncherro / movedigiphotos.bash
Created Dec 6, 2017 — forked from jvhaarst/movedigiphotos.bash
Bash script to move images, based on exif data and file timestamp
View movedigiphotos.bash
# Reads EXIF creation date from all .JPG files in the
# current directory and moves them carefully under
# ...where 'carefully' means that it does not overwrite
# differing files if they already exist and will not delete
# the original file if copying fails for some reason.
View docker-compose.yml
version: '2'
image: postgres:latest
image: memcached:latest
image: elasticsearch:latest
View Dockerfile
FROM ruby:2.2
RUN apt-get update && apt-get install -y \
build-essential \
nodejs \
libpq-dev \
libxml2-dev \
libxslt1-dev \
libqt4-webkit \
libqt4-dev \
ncherro /
Last active Apr 8, 2016
Add captions with FFmpeg
#!/usr/bin/env bash
SECOND="This is the
second caption"
ffmpeg -i "$1" \
-vf "[in] \
drawtext=enable='between(t,2,8)': \
ncherro / base_uploader.rb
Created Nov 23, 2014
CarrierWave base class - appends digest hash to the original filename
View base_uploader.rb
class BaseUploader < CarrierWave::Uploader::Base
include ::CarrierWave::MimeTypes
storage Rails.env.development? ? :file : :fog
process :set_content_type
# append digests to the original filename so we can validate file uniqueness
def md5
@md5 ||= Digest::MD5.hexdigest(model.send(mounted_as).read.to_s)
ncherro / gist:0c185b77348908dd02d1
Created Oct 2, 2014
S3 bucket policy for asset sync
View gist:0c185b77348908dd02d1
"Version": "2012-10-17",
"Statement": [
"Effect": "Allow",
"Action": ["s3:ListAllMyBuckets"],
"Resource": "arn:aws:s3:::*"
"Effect": "Allow",
View API.swift
// API.swift
// Created by Taro Minowa on 6/10/14.
// Copyright (c) 2014 Higepon Taro Minowa. All rights reserved.
import Foundation
typealias JSONDictionary = Dictionary<String, AnyObject>
View coffee-require-browserify.rb
#!/usr/bin/env ruby
require 'fileutils'
# setup
root_dir = ARGV[0] || "#{ENV['HOME']}/Desktop/coffee-to-browserify"
src_dir = ARGV[1] || "src"
dst_dir = ARGV[2] || "dst"
src = "#{root_dir}/#{src_dir}"
dst = "#{root_dir}/#{dst_dir}"
ncherro / gist:3b5567c19024306572bb
Last active Aug 29, 2015
Install rsync on an Asus RT-AC56U
View gist:3b5567c19024306572bb

Install rsync on an Asus RT-AC56U

  1. install asuswrt-merlin firmware
  2. enable ssh by visiting Administration > System and setting Enable SSH to 'Yes'
  3. install optware, following these instructions
  4. ssh into your router and run ipkg install rsync
You can’t perform that action at this time.