Skip to content

Instantly share code, notes, and snippets.

Dario Duvnjak dduvnjak

Block or report user

Report or block dduvnjak

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
View awssecretscan
# --- Command line
# --- Safety check
if [ -z "$GIT_DIR" ]; then
echo "Don't run this script from the command line." >&2
dduvnjak /
Last active Apr 18, 2018
Ron Swanson quote generator in Bash. Source it in your ~/.bash_profile for a steady supply of wisdom and small government advocacy.
#!/usr/bin/env bash
# set the quotes
quotes=$(cat <<-END
"Clear alcohols are for rich women on diets."
"Crying: acceptable at funerals and the Grand Canyon."
"I call this turf ‘n’ turf. It's a 16 oz T-bone and a 24 oz porterhouse. Also, whiskey and a cigar. I am going to consume all of this at the same time because I am a free American."
"Under my tutelage, you will grow from boys to men. From men into gladiators. And from gladiators into Swansons."
"I'm a simple man. I like pretty, dark-haired women, and breakfast food."
"Never half-ass two things. Whole-ass one thing."
dduvnjak /
Created May 25, 2016
Add CloudFlare IP addresses to an EC2 Security Group using awscli
# first we download the list of IP ranges from CloudFlare
# iterate over the lines in the downloaded file
# make sure to set `--group-id` and `--port`; more details at
while read p; do aws ec2 authorize-security-group-ingress --group-id sg-e0000000 --protocol tcp --port 80 --cidr $p; done< ips-v4
dduvnjak / newrelic.config
Created May 16, 2016
Installs and configures New Relic System Monitoring agent on AWS Elastic Beanstalk instances
View newrelic.config
# installs and configures New Relic System Monitoring agent
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env python
import boto.utils
dduvnjak / pre-commit
Last active Aug 22, 2018 — forked from DmZ/pre-commit
Git pre-commit hook to search for Amazon AWS API keys.
View pre-commit
if git rev-parse --verify HEAD >/dev/null 2>&1
# Initial commit: diff against an empty tree object
dduvnjak /
Last active Dec 2, 2015 — forked from sukharevd/
Script to install JBoss Wildfly 10.x as service in Linux
#description :The script to install Wildfly 10.x
#more :
#author :Dmitriy Sukharev
#date :2015-10-24T17:14-0700
#usage :/bin/bash
#tested-version :10.0.0.CR3
#tested-distros :Debian 7,8; Ubuntu 15.10; CentOS 7; Fedora 22
dduvnjak / .ebextensions--01phantom.config
Last active Oct 28, 2017
Elastic Beanstalk configuration file for installing phantomjs globally
View .ebextensions--01phantom.config
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env ruby
require 'json'
cc = "/opt/elasticbeanstalk/deploy/configuration/containerconfiguration"
j = JSON.parse(
dduvnjak /
Created Jan 27, 2014
Set up mod_jk with Apache on Windows

Download and install Apache from:

download mod_jk for windows:

extract and put it in the modules folder:
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\modules

Add this to the httpd.conf file (located at C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf)

dduvnjak / .rdebugrc
Created Aug 22, 2013
Quick Ruby debug (thanks to @hkraji)
View .rdebugrc
set autolist
set autoeval
set autoreload
set listsize 20
dduvnjak / .vimrc
Last active Dec 21, 2015
Vim syntax highlighting and indentation (.vimrc)
View .vimrc
filetype plugin indent on
set tabstop=4
set shiftwidth=4
set expandtab
syntax on
set backspace=indent,eol,start
You can’t perform that action at this time.