Skip to content

Instantly share code, notes, and snippets.

@azam
azam / ec2jenkins.sh
Last active September 5, 2015 00:49
EC2 Jenkins preparation script
#!/bin/bash
# This script is intended to be run as preparation script
# during creation of ec2 instance, which is executed as root.
# So we don't need to run these commands with sudo over here.
wget https://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
# NOTE: execute this 4 commands if you change repo, ie redhat to redhat-stable
# rm -f /var/lib/rpm/__db*
# rpm --rebuilddb
# yum clean all
@azam
azam / ec2prepare.sh
Last active August 29, 2015 14:23
EC2 environment preparation script for Java/Maven
#!/bin/sh
sudo yum -y update
sudo wget https://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum -y install java-1.8.0-openjdk-devel apache-maven git
sudo alternatives --set java /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
@azam
azam / Dockerfile
Last active August 29, 2015 14:16
FontCustom container on Debian 7
# (c) Azamshul Azizy, 2015
#
# Debian based container for fontcustom
# Ref: https://github.com/FontCustom/fontcustom/
# Ref: http://pivotallabs.com/generate-icon-fonts-automatically-with-fontcustom/
#
# TODO: install ttf2eot
#
# Usage example:
# docker run -v /home/me/svgs:/target -t azamshul/fontcustom compile /target --output /target/output
@azam
azam / Dockerfile
Last active August 29, 2015 14:16
Dockerfile for Debian 7 (Wheezy) , Oracle JDK 7 , and default user creation
# (c) Azamshul Azizy, 2014
#
# Original files:
# https://github.com/dockerfile/java/tree/master/oracle-java7
# https://github.com/clifton/docker-debian-base/master/Dockerfile
# Pull base image.
FROM debian:7
MAINTAINER Azamshul Azizy <azamshul@gmail.com>
@azam
azam / svg2ico.sh
Last active April 28, 2024 03:28
Convert SVG to ICO using ImageMagick, with transparent background and multi-size icons
convert -density 256x256 -background transparent favicon.svg -define icon:auto-resize -colors 256 favicon.ico
@azam
azam / archive-twitpic-data.py
Last active August 29, 2015 14:06 — forked from hugs/archive-twitpic-data.py
Twitpic Image and Data Archiver. Added exception handling, timeout, retry to page info and image file download
# Archive your Twitpic photos and metadata
#
# A cleaned-up fork of Terence Eden's original archiver:
# http://shkspr.mobi/blog/2013/08/exporting-twitpic-images-python/
#
# License: MIT
import shutil
import urllib2
import socket
@azam
azam / applicationContext-dynamodb.xml
Created April 7, 2014 07:06
Sample Spring application context to autowired DynamoDB client, with region or endpoint settings from proeprties or environment variable
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
@azam
azam / jenkins.ec2.init.d
Created March 24, 2014 04:39
Startup script for the Jenkins Continuous Integration server for Amazon EC2 Linux (via jar execution)
#!/bin/sh
#
# Startup script for the Jenkins Continuous Integration server for Amazon EC2 Linux
# (via jar execution)
#
# chkconfig: - 85 15
# description: Jenkins Continuous Integration Server
# processname: jenkins
# pidfile: /var/run/jenkins.pid