Skip to content

Instantly share code, notes, and snippets.

View ashish-d's full-sized avatar
:shipit:

Ashish Dingreja ashish-d

:shipit:
View GitHub Profile
@ashish-d
ashish-d / wildstar_ssl_puma.sh
Last active September 17, 2018 11:30 — forked from tadast/ssl_puma.sh
wildstar SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@ashish-d
ashish-d / .sh
Last active November 17, 2017 08:47
Convert mp4 to ogv and/or WebM
# Convert mp4 video to ogv and/or WebM
# Browser support:
# http://caniuse.com/#search=mp4
# http://caniuse.com/#search=ogv
# http://caniuse.com/#search=webm
# Installation:
brew install ffmpeg \
--with-tools \
@ashish-d
ashish-d / pre-commit
Created February 24, 2017 18:54
Pre commit hook that runs rubocop on staged files.
#!/usr/bin/env ruby
require 'rubocop'
require 'english'
ADDED_OR_MODIFIED = /A|AM|^M/
# to prevent code injection: system is a dangerous call
def raise_single_quote_error
raise ArgumentError, 'Single quotes are not allowed in filenames here.'
@ashish-d
ashish-d / rubocop.yml
Created February 24, 2017 18:49
Rubocop config
AllCops:
Exclude:
- 'db/schema.rb'
Rails:
Enabled: true
Metrics/LineLength:
Max: 120